﻿// Onload Event Handler
if (window.onload){
    var funMenuButton_Onload = window.onload;
    window.onload = new Function("funMenuButton_Onload(); MenuButton_Onload();");
}
else
    window.onload = MenuButton_Onload;
    
//Instantiate image objects:
var _menuOver;
var _menuOut;

//
function MenuButton_Onload(){
     
     _menuOver = new Image();
     _menuOver.src = "images/header/menu_over1.gif";
     _menuOut = new Image();
     _menuOut.src = "images/header/menu_out1.gif";       
     
}

function LoadContactForm(toEmail, subject, version){   
	
	var page = "contact.aspx?qsToEmail=" + toEmail + "&qsSubject=" + escape(subject) + "&qsVersion=" + escape(version);

	document.location.href = page;

}


function GoToOrderForm(orderType){

 
    //First, get the current webserverpath:
    var webServerPath = document.frmMain.hidWebServerPath.value; //Note hidWebServerPath should be added to your page just under your page's 
                                                                     //opening form tag, make sure it has runat="server", then in your codefile
                                                                     //add the following line in the Page_Load routine:
                                                                     //

                                                                     //Me.hidWebServerPath.value = Session("sWebServerPath")                                                                     

                                                                     //That line of code will populate the relative web server path into the
                                                                     //hidden field which in turn will be picked up by this function when
                                                                     //called from the client.
    

    //Then build a secure url and pass the order type as a querystring in the URL, the order.aspx codebehind will pick this querystring up
    //and instantiate the matching UOF order form control:	
    var url = "https:" + webServerPath + "order.aspx?qsOrderType=" + orderType;
    
    //Send the user to the order form:
    document.location.href = url;     

}

