﻿//Bookmark current page
function BookmarkThisPage() {
    var sTitle =  window.document.title;
    var sUrl = window.document.location.href;
    //var strLen = sUrl.length; 
    //sUrl = sUrl.slice(0,strLen-1);
    
    if (window.sidebar)			// Mozilla Firefox Bookmark
        window.sidebar.addPanel(sTitle, sUrl, "");
    else if (window.external)	// IE Favorite
        window.external.AddFavorite(sUrl, sTitle);
    else if (navigator.appVersion.indexOf('Mac') != -1)
        alert('Press Apple+D to bookmark this site.');
    else
        alert('Press Control+D to bookmark this site.');
}


// Print current page
function PrintThisPage() {
    if (window.print)
        window.print();
    else
        alert('Select PRINT from the File menu.');
}


/******************Leaving the Site – Off Ramp*************************/
function FollowURL(iLanguage, sURL, bReturn, sWndName, sOptions)
{
	var sPrompt;
	
	switch (iLanguage)
	{
		case 1: // iGlobalEng
			sPrompt = ""
			break;
		case 2: // iThirdPartyEng
			sPrompt = "Leaving the Site \n\n\n You have selected a link that will take you away from www.DiabetesPainHelp.com. \n\n  This Web site is neither owned nor controlled by Pfizer. Pfizer is not responsible for the content or services of this site."
			break;
	}
	
	if (sWndName == null) sWndName = "opener";
	if (sOptions == null) sOptions = "";

	if(! confirm(sPrompt))
		if (bReturn) return false;
		else return;

	var externalWin = window.open(sURL, null, sOptions);
	if (externalWin.opener == null)
		externalWin.opener = window;
	externalWin.opener.name = sWndName;
	if (bReturn) return true;
}
function PrintFriendly()
{
    document.getElementById('leftCol').style.display = "none";
	document.getElementById('bodyBottomSec').style.display = "none";
	document.getElementById('footerSec').style.display = "none";
    window.print();
}

function PrintFriendlyAll()
{
    window.print();
}
/**********************************************************************/

function GoToUrl(urlID) {
   url = null; 
   switch(urlID) {
      case "1" : {
         url = "http://www.TCOYD.org";
         break; 
         }
      case "2" : {
         url = "http://www.tcoyd.org/reg/"; 
         break; 
         }
      case "3" : {
         url = "http://tcoyd.org/component/page,shop.product_details/flypage,flypage.tpl/product_id,17/category_id,6/option,com_virtuemart/Itemid,152/"; 
         break; 
         }
      case "4" : {
         url = "http://www.eclips.consult.com/eclips/article/Sports%20Medicine/S0162-0908(08)70365-9"; 
         break; 
         }
      case "5" : {
         url = "http://www.diabetes.org/diabetes-research/summaries/balducci-exercise-neuropathy.jsp"; 
         break; 
         }
      case "6" : {
         url = "http://my.clevelandclinic.org/disorders/diabetes_mellitus/hic_foot_and_skin_related_complications_of_diabetes.aspx"; 
         break; 
         }
      case "7" : {
         url = "https://www.diabetes.org/weightloss-and-exercise/exercise/getting-started.jsp";
         break; 
         }
      case "8" : {
         url = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=400+West+Wisconsin+Avenue,+Milwaukee,+WI+53203&sll=37.0625,-95.677068&sspn=44.793449,113.994141&ie=UTF8&z=16&iwloc=A";
         break; 
         }
      case "9" : {
         url = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=5001+Great+America+Parkway,+Santa+Clara,+CA+95054&sll=43.03953,-87.916931&sspn=0.010147,0.027831&ie=UTF8&z=16";
         break; 
         }
      case "10" : {
         url = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=111+W+Harbor+Drive,+San+Diego,+CA+92101&sll=37.404221,-121.975408&sspn=0.011028,0.027831&ie=UTF8&z=16&iwloc=A";
         break; 
         }
      case "11" : {
         url = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=401+2nd+Street,+NW+Albuquerque,+New+Mexico+87102&sll=35.084889,-106.646815&sspn=0.090884,0.222645&ie=UTF8&z=16&iwloc=A";
         break; 
         }
      case "12" : {
         url = "http://www.lyrica.com/dpn_home.aspx";
         break; 
         }  
      case "13" : {
         url = "http://tcoyd.org/national-conferences/milwaukee-2009.html";
         break; 
         }                   
      case "14" : {
         url = "http://tcoyd.org/national-conferences/santa-clara-2009.html";
         break; 
         }           
      case "15" : {
         url = "http://tcoyd.org/national-conferences/san-diego-2009.html";
         break; 
         }   
      case "16" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      case "21" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         } 
      case "22" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      case "23" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      case "24" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         } 
      case "25" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      case "26" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      case "27" : {
         url = "http://tcoyd.org/national-conferences/albuquerque-2009.html";
         break; 
         }
      
       
      }
   if(url) {
      window.location = url;    
      }
   }
   
   function printdiv(printpage)
    {
    /*var headstr = "<html><head><title></title></head><body>";
    var footstr = "</body>";
    var newstr = document.getElementById(printpage).innerHTML;
    var oldstr = document.body.innerHTML;
    document.body.innerHTML = headstr+newstr+footstr;*/
    window.print(); 
    /*document.body.innerHTML = oldstr;
    return false;*/
    }
