<!--

function toggleVis(ele,defaultProp){
	ele=document.getElementById(ele);
	if (ele.style.display==''){
		ele.style.display=defaultProp;
	}
	ele.style.display=(ele.style.display !='none')?'none':'block';
}

function makeVis(ele,defaultProp){
   ele=document.getElementById(ele);
   if (ele.style.display==''){
       ele.style.display=defaultProp;
   }
   ele.style.display='block';
}

function hideVis(ele,defaultProp){
   ele=document.getElementById(ele);
   if (ele.style.display==''){
       ele.style.display=defaultProp;
   }
   ele.style.display='none';
}

function grab(content,zone)
	{ 
		var req = null; 
 		
 		
 		document.getElementById(zone).innerHTML  = "<p class='details'>Loading...";
		
		if (window.XMLHttpRequest)
		{
 			req = new XMLHttpRequest();
			if (req.overrideMimeType) 
			{
				req.overrideMimeType('text/html');
			}
		} 
		else if (window.ActiveXObject) 
		{
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e)
			{
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
	        	}

		req.onreadystatechange = function()
		{ 
			if(req.readyState == 4)
			{
				if(req.status == 200)
				{
					document.getElementById(zone).innerHTML  = req.responseText;	
				}	
				else	
				{
					document.getElementById(zone).innerHTML="Error: returned status code " + req.status + " " + req.statusText;
				}	
			} 
		}; 
		req.open("GET", content + ".html", true); 
		req.send(null); 
	} 

function popUpWindow(url,winW,winH)
{
	var theWidth = winW;
	var theHeight = winH;
	var theTop=(screen.height/2)-(theHeight/2);
	var theLeft=(screen.width/2)-(theWidth/2);
	var features='height='+theHeight+',width='+theWidth+',top='+theTop+',left='+theLeft+",scrollbars=yes";
	theWin=window.open(url,'',features);
}

// function to obfuscate email address
function getEmailAddress(){
c = "sjkkc@BkcUOx.Bc.d8";
k = "fRnEayqWPtjcmZzxUpl2diIwD50bNBQ784F3kLOAvhVMKS9g6JC1rGeoHXYsuT"
s=c.length
l=""
for (i=0; i<c.length; i++) {
if (k.indexOf(c.charAt(i))==-1) {
lr = c.charAt(i)
l += (lr)
}
else { 
lr = (k.indexOf(c.charAt(i))-s+k.length) % k.length
l += (k.charAt(lr))
}
}
return("<a href='mailto:"+l+"'>"+l+"</a>");
}

// function to write email address to ID
function writeEmailAddresses(){
if (document.getElementById('cloudse')){
document.getElementById('cloudse').innerHTML = getEmailAddress();
}
}

function shippingValidate() {
if (!document.forms["paypal"].elements["shipping"].options[0].selected) {
document.forms["paypal"].submit();
} else {
alert('Please select a Shipping option.');
}
}

function shippingBypass() {
document.forms["paypal"].submit();
}

function mushroomValidate() {
if (!document.forms["paypal"].elements["os0"].options[0].selected) {
if (!document.forms["paypal"].elements["shipping"].options[0].selected) {
document.forms["paypal"].submit();
} else {
alert('Please select a Shipping option.');
}
} else {
alert('Please select a Colour option.');
}
}


// function mushroomValidate() {
// if (paypal.os0.options[0].selected) {
// alert('Please select a Colour option.');
// event.returnValue=false;
// } else {
// if (paypal.shipping.options[0].selected) {
// alert('Please select a Shipping option.');
// event.returnValue=false;
// }
// }
// }

//-->