var base_url = "http://www.integratedsolardesign.com/";// VALIDATE CLIENTfunction validateClient() {	var first = document.clientform.first;	var last = document.clientform.last;	var username = document.clientform.username;	var password = document.clientform.password;	document.clientform.submit.className = "disabled";	document.clientform.reset.className = "disabled";		if(first.value == '') {		alert ("Please provide a first name...");		first.focus();		document.clientform.submit.className = "";		document.clientform.reset.className = "";		return false;	}	if(last.value == '') {		alert ("Please provide a last name...");		last.focus();		document.clientform.submit.className = "";		document.clientform.reset.className = "";		return false;	}	if(username.value == '') {		alert ("Please provide a username...");		username.focus();		document.clientform.submit.className = "";		document.clientform.reset.className = "";		return false;	}	if(password.value == '') {		alert ("Please provide a password...");		password.focus();		document.clientform.submit.className = "";		document.clientform.reset.className = "";		return false;	}}// VALIDATE FILEfunction validateFile(theform) {	theform.submit.className = "disabled";	theform.reset.className = "disabled";	var thefile = theform.file;	if(thefile.value == '') {		alert ("Please choose a file...");		thefile.focus();		theform.submit.disabled=false;		theform.reset.disabled=false;		document.clientform.submit.className = "";		document.clientform.reset.className = "";		return false;	}}// FILE DESCRIPTIONfunction fileDesc(mydiv, theid, thestate) {	// AJAX STUFF	var xmlhttp=false;	try {		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');	}	catch (e) {		try {			xmlhttp = new			ActiveXObject('Microsoft.XMLHTTP');		}		catch (E) {			xmlhttp = false;		}	}	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {		xmlhttp = new XMLHttpRequest();	}		if(thestate == "open") {		//mydiv.style.color = '#ae8160';		mydiv.style.cursor = 'default';		mydiv.innerHTML = "[loading]";	}	if(thestate == "close") {		//mydiv.style.color = '#ae8160';		mydiv.style.cursor = 'default';		mydiv.innerHTML = "[...]";	}		var file = "_inc/filedesc.php?id=" + theid + "&state=" + thestate;    xmlhttp.open('GET', file, true);    xmlhttp.onreadystatechange=function() {		if (xmlhttp.readyState==4) {			var content = xmlhttp.responseText;			if( content ) {				document.getElementById("desc" + theid).innerHTML = content;			}        }	}	xmlhttp.send(null) //Nullify the XMLHttpRequest	return;}/////////////////////////	FOR RANDOM IMAGE GENERATOR	///////////////////////function getrandom() {	document.getElementById('number').value = '';	var randnum = Math.floor(Math.random()*11);	return randnum;}function noenter() {	return !(window.event && window.event.keyCode == 13);}///////////////////////////////////////////////////////////////////////////// SHOW SPINNERfunction showSpinner() {	var spinner = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="32" height="32"><param name="wmode" value="transparent"><param name="movie" value="http://www.integratedsolardesign.com/_images/common/spin.swf" /><param name="quality" value="high" /><embed src="http://www.integratedsolardesign.com/_images/common/spin.swf" wmode="transparent" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="32" height="32"></embed></object>';	return spinner;}// SET BANNERSfunction setBanners() {	var h1s = $$('h1');	if(h1s[0]) {		h1s[0].style.paddingTop = "0px";		h1s[0].style.marginTop = "0px";		if(h1s[0].className == "banner") {			h1s[0].style.marginTop = "-5px";		}		for(var i=0; i<h1s.length; i++) {			if(h1s[i].className == "banner") {				h1s[i].innerHTML+= "\<span\>\<\/span\>";			}		}	}}////////////////////////////////     HOVER ACCORDION     ////////////////////////////////var imOpen = '';var HoverAccordion = Fx.Elements.extend({	options: {		onActive: Class.empty,		onBackground: Class.empty,		display: false,		show: false,		height: true,		width: false,		opacity: true,		fixedHeight: false,		fixedWidth: false,		wait: true,		alwaysHide: false	},	initialize: function(){		var options, togglers, elements, container;		$each(arguments, function(argument, i){			switch($type(argument)){				case 'object': options = argument; break;				case 'element': container = $(argument); break;				default:					var temp = $$(argument);					if (!togglers) togglers = temp;					else elements = temp;			}		});		this.togglers = togglers || [];		this.elements = elements || [];		this.container = $(container);		this.setOptions(options);		this.previous = -1;		if (this.options.alwaysHide) this.options.wait = true;		if ($chk(this.options.show)){			this.options.display = false;			this.previous = this.options.show;		}		if (this.options.start){			this.options.display = false;			this.options.show = false;		}		this.effects = {};		if (this.options.opacity) this.effects.opacity = 'fullOpacity';		if (this.options.width) this.effects.width = this.options.fixedWidth ? 'fullWidth' : 'offsetWidth';		if (this.options.height) this.effects.height = this.options.fixedHeight ? 'fullHeight' : 'scrollHeight';		for (var i = 0, l = this.togglers.length; i < l; i++) this.addSection(this.togglers[i], this.elements[i]);		this.elements.each(function(el, i){			if (this.options.show === i){				this.fireEvent('onActive', [this.togglers[i], el]);			} else {				for (var fx in this.effects) el.setStyle(fx, 0);			}		}, this);		this.parent(this.elements);		if ($chk(this.options.display)) this.display(this.options.display);							},	//	//Property: addSection	//	Dynamically adds a new section into the accordion at the specified position.	//Arguments:	//	toggler - (dom element) the element that toggles the accordion section open.	//	element - (dom element) the element that stretches open when the toggler is clicked.	//	pos - (integer) the index where these objects are to be inserted within the accordion.	//	addSection: function(toggler, element, pos){		toggler = $(toggler);		element = $(element);		//var icon = $('h3.atStart img');		var test = this.togglers.contains(toggler);		var len = this.togglers.length;		this.togglers.include(toggler);		this.elements.include(element);		if (len && (!test || pos)){			pos = $pick(pos, len - 1);			toggler.injectBefore(this.togglers[pos]);			element.injectAfter(toggler);		} else if (this.container && !test){			toggler.inject(this.container);			element.inject(this.container);		}		var idx = this.togglers.indexOf(toggler);		toggler.addEvent('mouseover', this.display.bind(this, idx));		if (this.options.height) element.setStyles({'padding-top': 0, 'border-top': 'none', 'padding-bottom': 0, 'border-bottom': 'none'});		if (this.options.width) element.setStyles({'padding-left': 0, 'border-left': 'none', 'padding-right': 0, 'border-right': 'none'});		element.fullOpacity = 1;		if (this.options.fixedWidth) element.fullWidth = this.options.fixedWidth;		if (this.options.fixedHeight) element.fullHeight = this.options.fixedHeight;		element.setStyle('overflow', 'hidden');		if (!test){			for (var fx in this.effects) element.setStyle(fx, 0);		}		return this;	},	//	//Property: display	//	Shows a specific section and hides all others. Useful when triggering an accordion from outside.	//Arguments:	//	index - integer, the index of the item to show, or the actual element to show.	//	display: function(index){		index = ($type(index) == 'element') ? this.elements.indexOf(index) : index;		if ((this.timer && this.options.wait) || (index === this.previous && !this.options.alwaysHide)) return this;		this.previous = index;		var obj = {};		this.elements.each(function(el, i){			obj[i] = {};			var hide = (i != index) || (this.options.alwaysHide && (el.offsetHeight > 0));			this.fireEvent(hide ? 'onBackground' : 'onActive', [this.togglers[i], el]);			var state = (hide ? 'off' : 'on');			if(i == index || hide) {				if( i == index) setOpen(index);				resizeIcon(i, state);			}			for (var fx in this.effects) obj[i][fx] = hide ? 0 : el[this.effects[fx]];		}, this);		return this.start(obj);	},		showThisHideOpen: function(index){return this.display(index);}});Fx.HoverAccordion = HoverAccordion;function setOpen(id) {	imOpen = id;}function resizeIcon(id, state) {	var icon = 'icon' + id;	var origName = $(icon).src;	origName2 = origName.replace(/[^a-zA-Z0-9]+/g,'');	origName3 = origName2.replace(/httpwwwintegratedsolardesigncomimagescommonicons/, '');	origName4 = origName3.replace(/gif/, '');	origName5 = origName4.replace(/2/, '')	var onName = "http://www.integratedsolardesign.com/_images/common/_icons/" + origName5 + "2.gif";	var offName = "http://www.integratedsolardesign.com/_images/common/_icons/" + origName5 + ".gif";	//alert (origName);	var theElement = 'element' + id;	var imgResize = new Fx.Styles($(icon), {duration: 200, transition: Fx.Transitions.Cubic.easeInOut, wait: true});	var height = (state == 'on') ? 64 : 32;	var width = height;	var left = (state == 'on') ? 0 : 16;	//var opacity = (state == 'on') ? 1 : 0;	var top = 5;	//var top = (state == 'on') ? (eval($(theElement).offsetHeight+32)/2) : 5;	imgResize.start({'height': height, 'width': width, 'left': left, 'top': top})	.chain(function() {		$(icon).src = (state == 'on') ? onName : offName;	});}
