function addLoadEvent(func) { 	var oldonload = window.onload; 	if (typeof window.onload != 'function') { 		window.onload = func; 	} else { 		window.onload = function() { 	      if (oldonload) { 	        oldonload(); 	      } 	      func(); 	    } 	  } 	} 	 	/* GETS SEVER TIME */	addLoadEvent(fixPNGs);	addLoadEvent(ScrollBarLoad);			addLoadEvent(function() { }) function ScrollBarLoad() {	//IF ScrollerLoad ID found load scroller	if(document.getElementById("Scrollarea")) {		ScrollerLoad('Scrollarea');	}}function AjaxCommand(ScriptPath, ElementID, LoadingID, LoadingContent, Commands, SendMethod) {	var url = ScriptPath;	var XHRequest = false;	//SHOWS LOADER	document.getElementById(LoadingID).innerHTML = LoadingContent;			if(window.XMLHttpRequest){	XHRequest = new XMLHttpRequest();	} else if(window.ActiveXObject){	XHRequest = new ActiveXObject("Microsoft.XMLHTTP");	}			if(XHRequest){	XHRequest.open(SendMethod, url);	XHRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');	XHRequest.onreadystatechange = function(){	if(XHRequest.readyState < 4){			} else if(XHRequest.readyState == 4 && XHRequest.status == 200){		document.getElementById(LoadingID).innerHTML = '';		document.getElementById(ElementID).innerHTML = XHRequest.responseText		delete XHRequest;		XHRequest = null;		}	}				XHRequest.send(Commands);	}	}function ScrollerLoad(Scrollarea) {	// vertical slider control	var slider3 = new Control.Slider('handle3', 'track3', {		axis: 'vertical',		onSlide: function(v) { scrollVertical(v, $(Scrollarea), slider3);  },		onChange: function(v) { scrollVertical(v, $(Scrollarea), slider3); }	});		// scroll the element vertically based on its width and the slider maximum value	function scrollVertical(value, element, slider) {		element.scrollTop = Math.round(value/slider.maximum*(element.scrollHeight-element.offsetHeight));	}}function SubmitForm (FormName) {	var form_div = document.getElementById("form_div");	var form_loader = document.getElementById("form_loader");	Effect.BlindDown('form_loader', { duration: 1.0 });	form_div.style.opacity="0.4";		var url = "includes/fuctions.aspx";	var XHRequest = false;	var Commands = "";	//SHOWS LOADER			if(window.XMLHttpRequest){	XHRequest = new XMLHttpRequest();	} else if(window.ActiveXObject){	XHRequest = new ActiveXObject("Microsoft.XMLHTTP");	}			if(XHRequest){	XHRequest.open("POST", url);	XHRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');	XHRequest.onreadystatechange = function(){	if(XHRequest.readyState < 4){			} else if(XHRequest.readyState == 4 && XHRequest.status == 200){		document.getElementById("status").innerHTML = XHRequest.responseText;				self.setTimeout(function() {						if(document.getElementById("form_status").innerHTML=="complete") {				// FORM COMPLETE HIDE LOADER				Effect.BlindUp('form_loader', { duration: 1.0 });				form_div.style.opacity="1.0";			} else {				form_div.style.background="none";				form_loader.innerHTML=document.getElementById("form_status").innerHTML;			}								 		}, 2000);				delete XHRequest;		XHRequest = null;		}	}			for(i=0; i<document.form1.elements.length; i++)		{			FormRequest = FormRequest + "&" + escape(document.form.elements[i].name) + "=" + escape(document.form.elements[i].value);		}				XHRequest.send("sAction=SubmitForm&FormName"+FormName+"&"+FormRequest);	}	}function ImageLoad(ImageName) {	var Ajax = null;	var ProdAjax = null;	var Transparent = null;	var test = document.getElementById("Ajax");		if(test==null) {		//Creates Main Ajax Holder		Ajax = document.createElement('div');		Ajax.setAttribute('id','Ajax');				//Creates Transparent Background		Transparent = document.createElement('div');		Transparent.setAttribute('id','Transparent');		Transparent.setAttribute('style','display:block;');		Transparent.onclick = function() { 			$('ProdAjax').morph('height:150px; width:150px; margin-left:-75px; top:300px;');			Transparent.style.display="none";			$('ProdAjax').fade({ duration: 0.5 });		};				//Creates Prod Ajax Div		ProdAjax = document.createElement('div');		ProdAjax.setAttribute('id','ProdAjax');		ProdAjax.setAttribute('style','height:150px; width:150px;');										Ajax.appendChild(Transparent);		Ajax.appendChild(ProdAjax);				document.body.appendChild(Ajax); 			} else {		ProdAjax = document.getElementById("ProdAjax");		test.style.display="block";		ProdAjax.innerHTML="";		ProdAjax.style.display="block";		ProdAjax.style.background="url('images/ajax-loader.gif') no-repeat center center #FFF";		$('ProdAjax').morph('height:150px; width:150px; margin-left:-75px; top:300px;');	}		ProdAjax = document.getElementById("ProdAjax");	Transparent = document.getElementById("Transparent");	Transparent.style.display="block";	ProdAjax.style.display="block";		self.setTimeout(function() {		var x = false;		while (x == false) {			if (ProdAjax.offsetWidth=='150') {				$('ProdAjax').morph('height:auto; width:auto; margin-left:-400px; top:30px;');				ProdAjax.style.background="#FFF";				x = true;								//AjaxCommand("includes/functions.aspx", "ProdAjax", "ProdAjax", "", "sAction=LoadProduct&ProdID=" + ProductID, "POST");			} 					}	}, 2000);		self.setTimeout(function() {		ProdAjax.innerHTML = '<img src="' + ImageName + '" class="LargeImg" />';	}, 3000);}function popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=100,left = 100,top = 20');");}