﻿      function GoToInventory() {
             window.location.href = "./InventoryList.aspx?levelId=10";  
      }
      function openWindow(theURL,winName,features) { 
            newwindow=window.open(theURL,winName,'width=750,height=750,screenx=100,screeny=100,scrollbars=yes,location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes');
            newwindow.top;
            newwindow.focus;
      }  
      function openFormWindow(theURL,winName) { 
            newwindow=window.open(theURL,winName,'width=600,height=500,screenx=100,screeny=100,scrollbars=no,location=yes,menubar=no,resizable=yes,status=yes,toolbar=yes');
            newwindow.top;
            newwindow.focus;
      } 
      function openSignUpWindow(theURL,features,requestType) {
            
           if (requestType == 'S') {
            //alert(document.getElementById('txtEmailSeminar').value);
            address=document.getElementById('ctl00_txtEmailSeminar').value;
            newURL = theURL+'?formid=1&email='+address+''
           } else {
            //alert(document.getElementById('txtEmailBrochure').value);
            address=document.getElementById('ctl00_txtEmailBrochure').value;
            newURL = theURL+'?formid=2&email='+address+''
           }
           
           
           window.open(newURL,'SignUp',features);
           return false;
    } 
    
    function od_displayImage2(strId, strPath, strClass, strAlt) { 
	if (pngAlpha) {
		document.write('<div style="px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', sizingMethod=\'scale\')" id="'+strId+'" class="'+strClass+'">');
		//document.write('<div style="height:'+intHeight+'px;width:'+xWithScroll+'px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', sizingMethod=\'scale\')" id="'+strId+'" class="'+strClass+'"></div>');
		//alert('<div style="height:'+intHeight+'px;width:'+xWidthScroll+'px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', sizingMethod=\'scale\')" id="'+strId+'" class="'+strClass+'"></div>');
	} else if (pngNormal) {
		//document.write('<img src="'+strPath+'.png" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
		//document.write('<img src="'+strPath+'.png" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
		//alert('<img src="'+strPath+'.png" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
	} else {
		//document.write('<img src="'+strPath+'.gif" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
		//document.write('<img src="'+strPath+'.gif" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
		//alert('<img src="'+strPath+'.gif" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');
	}
}


function swapHeadImagesOnClick(ImageId,ImageIdOn,ImageIdOff) {
    var Img=document.getElementById(ImageId);
    var ImgOn=document.getElementById(ImageIdOn);
    var ImgOff=document.getElementById(ImageIdOff);
    //Since the user clicked this header set its image to the "on" version
    if (Img.src==ImgOn.src) {
        //alert("Img:"+Img.src+" Turn Off:"+ImgOff.src);
        Img.src=ImgOff.src;
    } else {
       //alert("Img:"+Img.src+" Turn On:"+ImgOn.src);
       Img.src=ImgOn.src;
    } 
    
    //Set the other two header images to light version
    //I'm not happy about hardcoding this, but can't figure out how to get the reference
    //dynamically
    //Is it possible to set the onckick event in the ItemCreated event?
    var head1Id ='ctl00_ctl03_TopNavImage';  
    var head2Id ='ctl00_ctl06_TopNavImage';
    var head3Id ='ctl00_ctl09_TopNavImage';
    var head1 =document.getElementById('ctl00_ctl03_TopNavImage');  
    var head2 =document.getElementById('ctl00_ctl06_TopNavImage');
    var head3 =document.getElementById('ctl00_ctl09_TopNavImage');
    var head1Off=document.getElementById('ctl00_ctl03_TopNavImageOff');
    var head2Off=document.getElementById('ctl00_ctl06_TopNavImageOff');
    var head3Off =document.getElementById('ctl00_ctl09_TopNavImageOff');

    if (head1Id==ImageId) {
        //alert("Header1 Clicked");
        head2.src=head2Off.src;
        head3.src=head3Off.src;
    } else if (head2Id==ImageId) {
        //alert("Header2 Clicked");
        head1.src=head1Off.src;
        head3.src=head3Off.src;
    } else if (head3Id==ImageId) {
        //alert("Header3 Clicked");
        head1.src=head1Off.src;
        head2.src=head2Off.src;
    }
}

function HideHeaders(ImageId) {
    //I want the TopNavImageOn and TopNavImageOff to be hidden, just need them for their urls
    //so I can swap images
    var Img=document.getElementById(ImageId);
    Img.style.display="none";
}