//if(!document.getElementById && navigator.appName == "Netscape")
//{
//location = "/includes/upgrade.html";
//}

//Use this to check popup cookie on every page.
//checkSalesTaxCookie();

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


//function MM_reloadPage(init) {  //reloads the window if Nav4 resized
//  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
//    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
//  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
//}
//MM_reloadPage(true);


function openwindow(url,name,features){
window.open(url,name,features);
}

function openwindowChartElliptical(){
wth = screen.width;
win1 = window.open('http://www.treadmillscentral.com/sortLoadingE.aspx','chart','left=0,top=0,height=300,width='+wth+',scrollbars=yes,toolbar=no,resizable=yes')
win1.focus();
//win1.moveTo(0,0);
}

function openwindowChart(){
wth = screen.width;
win2 = window.open('http://www.treadmillscentral.com/sortLoadingT.aspx','chartEllip','left=0,top=0,height=300,width='+wth+',scrollbars=yes,toolbar=no,resizable=yes')
win2.focus();
//win1.moveTo(0,0);
}



function openwindowBigProductPic(picName){
//wth = screen.width;
//hght = screen.height;
win1 = window.open('http://www.treadmillscentral.com/pages/popLarge.htm?thePicName='+picName+'','chart','left=0,top=0,height=480,width=640,scrollbars=yes,menubar=yes,resizable=yes')
win1.focus();
//win1.moveTo(0,0);

}

function statPrint(msgStr) {
  status=msgStr;
}

function holidayPop(){
window.open('_hours.html','hours','width=350,height=200')
}

function sysDownPop(){
window.open('sysDownPop.htm','hours','width=355,height=160')

}

function checkSalesTaxCookie()
{
 var cookVal="";
 var flag=0;
 for(i=0;i<document.cookie.length;i++){
 	if(document.cookie.charAt(i)==";") flag=1;
 	if(flag==0) cookVal=cookVal+document.cookie.charAt(i);
 }
if (cookVal != "Treadmillscentral.com sales tax cookie set.")
{
openwindow('http://www.treadmillscentral.com/salesTax.htm','salesTax','height=195,width=335,scrollbars=no');
document.cookie = "Treadmillscentral.com sales tax cookie set.";
}
}

function checkSalesTaxCookie2()
{alert(document.cookie);
 var cookVal="";
 var flag=0;
 for(i=0;i<document.cookie.length;i++){
 	if(document.cookie.charAt(i)==";") flag=1;
 	if(flag==0) cookVal=cookVal+document.cookie.charAt(i);
 }
if (cookVal != "Treadmillscentral.com sales tax cookie set.")
{
openwindow('http://www.treadmillscentral.com/salesTax.htm','salesTax','height=195,width=335,scrollbars=no');
document.cookie = "Treadmillscentral.com sales tax cookie set.";
}
}

//var exit=true;
//function doQuestions(){
  // if(exit)
  //   //openwindow('http://www.treadmillscentral.com/questions.html','win','height=//550,width=450,scrollbars=yes');
//}

//function doLoad(){
    //alert("hi "+document.links[document.links.length-1].href);
   //if(win!=undefined)
      //win.close();
   //for(var i=0;i<document.links.length;i++){
   //  if(!(document.links[i].href.length >11 && //document.links[i].href.substring(0,11)=="javascript:"))
  //   document.links[i].href="javascript:doClick('"+document.links[i].href+"');";
 //  }
//}

//function doClick(goLink){
	//exit=false;
	//window.location.href=goLink;
	//alert("clicked");
//}