// Rollover params
//	JSFX.Rollover("b1", "gfx/btns/homeover.gif");
//	JSFX.Rollover("b2", "gfx/btns/biographyover.gif");
//	JSFX.Rollover("b3", "gfx/btns/musicover.gif");
//	JSFX.Rollover("b4", "gfx/btns/faithover.gif");
//	JSFX.Rollover("b5", "gfx/btns/eventsover.gif");
//	JSFX.Rollover("b6", "gfx/btns/contactover.gif");
//
//updateship
function updateship() {
	
	shipto = document.form1.shipzone.selectedIndex;
	if (shipto == 0) {
			
		shiptotal = document.getElementById('tuk').value;
		shipx = document.getElementById('uk').value;
		document.getElementById('shiptot').innerHTML = shiptotal;
		document.getElementById('shipcost').innerHTML = shipx;
		
	}
	if (shipto == 1) {
			
		shiptotal = document.getElementById('teu').value;
		shipx = document.getElementById('eu').value;
		document.getElementById('shiptot').innerHTML = shiptotal;
		document.getElementById('shipcost').innerHTML = shipx;
		
	}
	if (shipto == 2) {
			
		shiptotal = document.getElementById('tw').value;
		shipx = document.getElementById('w').value;
		document.getElementById('shiptot').innerHTML = shiptotal;
		document.getElementById('shipcost').innerHTML = shipx;
		
	}
	
}					   
//checkpayform
function checkpayment() {	
	errormsg = "";		
	if (document.getElementById('name').value == "Your Name") { errormsg += "Please enter your name\n"; }
	var emailID=document.form1.email
	if (echeck(emailID.value)==false){ errormsg += "Invalid email address.\n"; }		
	if (errormsg == "") {		
		document.form1.submit();		
	} else {		
		alert(errormsg);		
	}	
}
//showpost
var dropped = true;
function showpost() {
	if (dropped == false) {
		document.getElementById('postdetails').style.display = "block";
		document.getElementById('ship').style.display = "block";
		document.getElementById('carttotal').style.display = "none";
		document.getElementById('qty').style.display = "block";
		dropped = true;	
	} else {
		document.getElementById('postdetails').style.display = "none";
		document.getElementById('ship').style.display = "none";
		document.getElementById('carttotal').style.display = "block";
		document.getElementById('qty').style.display = "none";
		dropped = false;	
	}
}
//sendcontact
function sendcontact() {	
	errormsg = "";		
	if (document.getElementById('name').value == "Your Name") { errormsg += "Please enter your name\n"; }
	var emailID=document.form1.email
	if (echeck(emailID.value)==false){ errormsg += "Invalid email address.\n"; }		
	if (errormsg == "") {		
		document.form1.submit();		
	} else {		
		alert(errormsg);		
	}	
}
// form validation
function sendrequest() {		
		errormsg = "";		
	    if (document.getElementById('name').value == "") { errormsg += "Please enter your name\n"; }
		var emailID=document.form1.email
		if (echeck(emailID.value)==false){ errormsg += "Invalid email address.\n"; }		
		if (errormsg == "") {		
			document.form1.submit();		
		} else {		
			alert(errormsg);		
		}
	}
	
function echeck(str) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		return false
	}
	 if (str.indexOf(at,(lat+1))!=-1){
		return false
	 }
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		return false
	 }
	if (str.indexOf(dot,(lat+2))==-1){
	   return false
	}
	if (str.indexOf(" ")!=-1){
	   return false
	}
	return true					
}
//jumpmenu
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}