function addClass(e,c){e.className=" "+c;}
function removeClass(e,c){e.className=e.className.replace(c,"");}
function i_d(e){return document.getElementById(e);}
function hide(e){e.style.display='none';}
function show(e){e.style.display='block';}
function getNextElement(elemRef){
	if (typeof(elemRef) == 'string'){ elemRef = document.getElementById(elemRef);}

	if (elemRef) {
		var nextSib = elemRef.nextSibling;
		if (nextSib) {
			while(nextSib.nodeType != 1 || nextSib.nodeName == '!') {
				nextSib = nextSib.nextSibling;
				// bail if we ran out of siblings
				if (!nextSib){ return false;}
			}
		}
		if (nextSib){ return nextSib;}
	}
}
function getPreviousElement(elemRef) {
	if (typeof(elemRef) == 'string'){ elemRef = document.getElementById(elemRef);}

	if (elemRef) {
		var previousSib = elemRef.previousSibling;
		if (previousSib) {
			while(previousSib.nodeType != 1 || previousSib.nodeName == '!') {
				previousSib = previousSib.previousSibling;
				if (!previousSib){ return false;}
			}
		}
		if (previousSib){ return previousSib;}
	}
}
function getLastChildElement(parentRef) {
	if (typeof(parentRef) == 'string'){ parentRef = document.getElementById(parentRef);}

	if (parentRef) {
		var lastChildRef = parentRef.lastChild;
		if (lastChildRef) {
			if (lastChildRef.nodeType != 1 || lastChildRef.nodeName == '!') {
				lastChildRef = getPreviousElement(lastChildRef);
			}
			if (lastChildRef.nodeType == 1 && lastChildRef.nodeName != '!'){ return lastChildRef;}
		}
	}
}
function getFirstChildElement(elemRef) {
	if (typeof(elemRef) == 'string'){ elemRef = document.getElementById(elemRef);}
	if (elemRef) {
		var firstChildRef = elemRef.firstChild;
		if (firstChildRef) {
			if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') {
				firstChildRef = firstChildRef.nextSibling;
			}
			if (firstChildRef) {
				if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') {
					firstChildRef = firstChildRef.nextSibling;
				}
			}
			if (firstChildRef) {
				if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') {
					firstChildRef = firstChildRef.nextSibling;
				}
			}
		}
		if (firstChildRef){ return firstChildRef;}
	}
}
function findObj(theObj,theDoc){var p,i,foundObj;if(!theDoc){theDoc=document;}if((p=theObj.indexOf("?"))>0&&parent.frames.length){theDoc=parent.frames[theObj.substring(p+1)].document;theObj=theObj.substring(0,p);}if(!(foundObj=theDoc[theObj])&&theDoc.all){foundObj=theDoc.all[theObj]};for(i=0;!foundObj&&i<theDoc.forms.length;i++){foundObj=theDoc.forms[i][theObj];}for(i=0;!foundObj&&theDoc.layers&&i<theDoc.layers.length;i++){foundObj=findObj(theObj,theDoc.layers[i].document);}if(!foundObj&&document.getElementById){foundObj=document.getElementById(theObj)};return foundObj;}function showHideLayers(){var i,visStr,obj,args=showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3){if((obj=findObj(args[i]))!=null){visStr=args[i+2];if(obj.style){obj=obj.style;if(visStr=='show'){visStr='visible';}else if(visStr=='hide'){visStr='hidden';}}obj.visibility=visStr;}}}function MM_jumpMenu(targ,selObj,restore){var myPath="quotation.php?pID=";eval(targ+".location='"+myPath+selObj.options[selObj.selectedIndex].value+"'");if(restore){selObj.selectedIndex=0};}function addEmail(email){var objEmail=document.getElementById("emailto");var person=document.getElementById("person");person.value=email;objEmail.value=email;}function loadFaqs(container,id){var obj=document.getElementById(container);obj.style.visibility='visible';checkView(id,container);}function advCursur(obj,target){var obj2=document.getElementById(target);}function showOptions(obj,tbl,val1,val2){var table=document.getElementById(tbl);var rCount=table.rows.length;if(rCount>=2){if(obj.value=='Yes'&&active==false){var newRow=table.insertRow(rCount);var cell_1=newRow.insertCell(0);var cell_2=newRow.insertCell(1);cell_1.style.backgroundColor='#FFECED';cell_1.innerHTML=val1;cell_2.innerHTML='<input type="text" name="'+val2+'" style="width:16%" />';active=true;}else if(obj.value=='No'&&active==true){table.deleteRow(rCount-1);active=false;}}}function initQuoteSys(input,obj){var sObj=document.getElementById(obj);if(input.value==''){sObj.innerHTML='<span class="progressTitle">START</span><br /><img src="images/step1_off.gif" />';}else{sObj.innerHTML='<span style="font-size:10px;font-weight:bold;color:#cc0000;">START</span><br /><img src="images/step1_on.gif" />';}}function SetValue(obj,checkvalue){if(obj.value==""){obj.value=checkvalue;}else if(obj.value!=""){if(obj.value.length==1){obj.value='0'+obj.value;}}}function ClearValue(obj,checkvalue){if(obj.value==checkvalue){obj.value="";}}function TabNext(obj,len,next_field){if(obj.value.length==len){next_field.focus();}}function setFormDate(dd,mm,yyyy,target){obj1=document.getElementById(dd);obj2=document.getElementById(mm);obj3=document.getElementById(target);obj4=document.getElementById(yyyy);obj3.value=obj4.value+'-'+obj2.value+'-'+obj1.value;}function disableSubmit(obj){obj1=document.getElementById(obj);obj1.disabled=true;obj1.src='images/please_wait.jpg';}
var jslib={
	goToURL:function(url){
		location.href=url;
	},
	fullScreen:function(u){
		window.open(u, 'lgview', 'fullscreen=1,dependent=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0');
	}
};