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();			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;	document.getElementById(LoadingID).style.display="block";			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).style.display="none";		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 SearchPopup (status) {	seachDiv = document.getElementById('SearchBox');	if (seachDiv.style.display=="none") {		Effect.SlideDown('SearchBox', { duration: 0.5 });	} else {		Effect.SlideUp('SearchBox', { duration: 0.5 });	}}function clearthis(elementid,elementvalue) {	var textbox = document.getElementById(elementid);	if (textbox.value==elementvalue) {		textbox.value = "";		textbox.style.color="#000";	} else if (textbox.value=="") {		textbox.value=elementvalue;		textbox.style.color="#666";	}}function SendForm(form) {	var form_div = document.getElementById("form_div");	var Message = document.getElementById("form_message");	var form_loader = document.getElementById("loader");	Effect.Appear('loader_container', { duration: 1.0 });	Effect.Appear('form_message', { duration: 0.5 });	form_div.style.opacity="0.4";			var url = "phpscripts/contactscript.php";	var XHRequest = false;	var FormRequest = "";			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;		SendFormComp(form);				delete XHRequest;		XHRequest = null;		}	}		FormRequest = "name=" + escape(form.name.value) + "&email=" + escape(form.email.value) + "&message=" + escape(form.message.value);	XHRequest.send(FormRequest);			}}function SendFormComp(form) {	var form_div = document.getElementById("form_div");	var formStatus = document.getElementById("status").innerHTML;	var Message = document.getElementById("form_message");	var loader = document.getElementById("loader");		if (formStatus!="Thank you, message Sent") {		self.setTimeout(function() {			loader.style.background="none";			//$('loader').morph('width:190px; margin-top:0px; padding:10px;');				Effect.Appear('form_message', { duration: 2.0 });			Message.innerHTML = formStatus;					}, 2000);	} else {		loader.style.background="none";		Effect.Appear('form_message', { duration: 2.0 });		Message.innerHTML = formStatus;		self.setTimeout(function() {			//loader.style.background="url('images/ajax-loader.gif') center center no-repeat ";			form_div.style.opacity="1.0";			form.name.value = "";			form.email.value = ""; 			form.message.value = "";			CloseMessage();					}, 4000);	}}function CloseMessage() {	var form_div = document.getElementById("form_div");	var message = document.getElementById("form_message");	var loader = document.getElementById("loader");	Effect.Fade('loader_container', { duration: 1.0 });	message.innerHTML = "";		form_div.style.opacity="1.0";	//$('loader').morph('width:190px; margin-top:0px; padding:0px;');	loader.style.background="url('images/ajax-loader.gif') left center no-repeat";	}function GalleryEnlarge(ImgSrc) {	var GalleryMain = document.getElementById("MainImg");	GalleryMain.src = ImgSrc;}