function preloadNav()
{
	preloadImages('images/nav/n1_off.gif','images/nav/n1_on.gif','images/nav/n2_off.gif','images/nav/n2_on.gif','images/nav/n3_off.gif','images/nav/n3_on.gif','images/nav/n4_off.gif','images/nav/n4_on.gif','images/nav/n5_off.gif','images/nav/n5_on.gif');
}
function preloadImages() {
	var d=document; 
	if(d.images)
	{ 
		if(!d.p)
			d.p=new Array();
			
		var i,j=d.p.length,a=preloadImages.arguments;
		for(i=0; i<a.length; i++)
		{
			if (a[i].indexOf("#")!=0)
			{
				d.p[j]=new Image;
				d.p[j++].src=a[i];
			}
		}
	}
}

function openWindow(type,x)
{
    var newwin;
    
    switch(type)
    {
        case "DOC":
            newwin = window.open(x,"NewWin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "PR":
            newwin = window.open("/press-release.aspx?pk=" + x,"NewWin","width=400,height=500,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "VIDEO":
            newwin = window.open("/about-us/supper-club-video.html","NewWin","width=393,height=330,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "PRIVACY":
            newwin = window.open("/privacy-policy.htm","NewWin","width=393,height=330,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "MO":
            newwin = window.open("/mealoffer/video.htm","NewWin","width=500,height=450,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "UPC":
            newwin = window.open("/customer-service/upc.html", "NewWin", "width=250,height=125,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        case "BB":
            newwin = window.open("/customer-service/bb.html", "NewWin", "width=250,height=125,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=150,top=150,alwaysRaised=1");
            break;
        default:
            newwin = window.open("#","NewWin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400,left=150,top=150,alwaysRaised=1");
            break;
    }
    
    newwin.focus();
}

function changeClubPic(id)
{
    document.currentSlideshow.src = "images/sub/supperclubpics/lg" + id + ".jpg";
}

function printPage()
{
    print();
}

function closePage()
{
    window.close();
}

function roll(img,type)
{
    // swap on/off image
	if (type == "on")
		img.src = img.src.replace('_off','_on');
	else if (type == "off")
		img.src = img.src.replace('_on','_off');
}

function sstchur_SmartScroller_GetCoords()
{
  var scrollX, scrollY;
  
  if (document.all)
  {
     if (!document.documentElement.scrollLeft)
        scrollX = document.body.scrollLeft;
     else
        scrollX = document.documentElement.scrollLeft;
           
     if (!document.documentElement.scrollTop)
        scrollY = document.body.scrollTop;
     else
        scrollY = document.documentElement.scrollTop;
  }   
  else
  {
     scrollX = window.pageXOffset;
     scrollY = window.pageYOffset;
  }
  document.forms["aspnetForm"].ctl00_xCoordHolder.value = scrollX;
  document.forms["aspnetForm"].ctl00_yCoordHolder.value = scrollY;
}

function sstchur_SmartScroller_Scroll()
{
  var x = document.forms["aspnetForm"].ctl00_xCoordHolder.value;
  var y = document.forms["aspnetForm"].ctl00_yCoordHolder.value;
  window.scrollTo(x, y);
}

//window.onload = sstchur_SmartScroller_Scroll;
//window.onclick = sstchur_SmartScroller_GetCoords;

function writeSupperFlash()
{
    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"375\" height=\"300\" id=\"supper-club-video\" align=\"middle\">");
    document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
    document.write("<param name=\"movie\" value=\"supper-club-video.swf\" />");
    document.write("<param name=\"quality\" value=\"high\" />");
    document.write("<param name=\"scale\" value=\"exactfit\" />");
    document.write("<param name=\"bgcolor\" value=\"#ffffff\" />");
    document.write("<embed src=\"supper-club-video.swf\" quality=\"high\" scale=\"exactfit\" bgcolor=\"#ffffff\" width=\"375\" height=\"300\" name=\"supper-club-video\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
    document.write("</object>");
}

function writeIndexFlash()
{
    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"430\" height=\"252\" id=\"supper-club-video\" align=\"middle\">");
    document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
    document.write("<param name=\"movie\" value=\"kahiki_index.swf\" />");
    document.write("<param name=\"quality\" value=\"high\" />");
    document.write("<param name=\"scale\" value=\"exactfit\" />");
    document.write("<param name=\"bgcolor\" value=\"#ffffff\" />");
    document.write("<param name=\"wmode\" value=\"transparent\" />");
    document.write("<param name=\"menu\" value=\"false\" />");
    document.write("<embed src=\"kahiki_index.swf\" quality=\"high\" wmode=\"transparent\" scale=\"exactfit\" bgcolor=\"#ffffff\" width=\"430\" height=\"252\" menu=\"false\" name=\"supper-club-video\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
    document.write("</object>");
}