//----------------------------------------------
//----------------------------------------------
//----------------------------------------------
//----JAVASCRIPT 1.4 ---------------------------
//----COPYRIGHTS MEDIA WORKS 2007 --------------
//----------------------------------------------
//----------------------------------------------
//----------------------------------------------
function trt(tt){
	document.getElementById(tt).bgColor="#ffffff";
	//alert(tt);
}
function trt1(tt){
	//tt.bgcolor="#2e3092";
	document.getElementById(tt).bgColor="#cccccc";
}
// ROLL OVER / ROLL OUT - COLOR CHANGE
function ch(tt){
	document.getElementById(tt).bgColor="#d22329";
	//alert(tt);
}
function ch1(tt){
	//tt.bgcolor="#2e3092";
	document.getElementById(tt).bgColor="#2e3092";
}

function texto(tt){
	tt.style.color="#ff0000";
}
function texto1(tt){
	tt.style.color="#000000";
}
// play intro
function showintro(){
	window.open('codepage/intro.php','imgbiggo','scrollbars=no,width=520,height=293');
}
// MAILING LIST SUBMIT 
function checkml(){
	em_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	if(document.mlist.fn.value==""){
		alert("Please Enter Your Full Name");
		document.mlist.fn.focus();
		return false;
	} else if(em_val.test(document.mlist.ml.value)==false){
		alert("Invalid E-mail Address");
		document.mlist.ml.focus();
		return false;
	} else {
		document.mlist.submit();
	}
}
// jobs function
function checkmembers(){
	em_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	if(document.members.fn.value==""){
	alert("Enter Your Full Name");
	document.members.fn.focus();
	} else if(document.members.placeb.value==""){
	alert("Enter Your Place Of Birth");
	document.members.placeb.focus();
	} else if(document.members.dateb.value==""){
	alert("Enter Your Date Of Birth");
	document.members.dateb.focus();
	} else if(document.members.natio.value==""){
	alert("Enter Your Nationality");
	document.members.natio.focus();
	} else if(document.members.presaddress.value==""){
	alert("Enter Your Present Address");
	document.members.presaddress.focus();
	} else if (em_val.test(document.members.mailo.value)==false){
	alert("Invalid E-Mail Address");
	document.members.mailo.focus();
	} else if(document.members.pnum.value==""){
	alert("Enter Your Phone Number");
	document.members.pnum.focus();
	} else {
	document.members.submit();
	}
}
// voting
function checkvote(){
	var rad=document.vtse.elements.length;
	
	var c=0;
	for(i=0;i<rad;i++){
		if(document.vtse.elements[i].checked==true){
			var c=c+1;
		}
	}
	if(c==1){
		document.vtse.submit();
	} else {
		alert("Please Select answer");
	}
}

function voteresult(){
	window.open('codepage/voteresult.php','aboutus','scrollbars=yes,width=300,height=400');
}

function voteresultall(){
	window.open('codepage/voteresultall.php','aboutus','scrollbars=yes,width=300,height=400');
}

// CONTACT US SUBMIT
function checkcontact(){
	em_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	if(document.conta.ctfn.value==""){
		alert("Enter Your Full Name");
		document.conta.ctfn.focus();
	} else if(document.conta.ctco.value==""){
		alert("Enter Your Country");
		document.conta.ctco.focus();
	} else if (em_val.test(document.conta.ctml.value)==false){
		alert("Invalid E-mail Address");
		document.conta.ctml.focus();
	} else if(document.conta.ctme.value==""){
		alert("Write The Message");
		document.conta.ctme.focus();
	} else {
		document.conta.submit();
	}
}


// ENLARGE PICTURE
function got(yt,wi,hi,idd){
	hie=Number(hi)+90;
	wie=Number(wi)+18;
	window.open('codepage/viewimg.php?img='+yt+'&id='+idd,'imgbiggo','scrollbars=yes,width='+wie+',height='+hie);
}

// send to
function checksend(){
em_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/
if(document.sendtof.yourname.value==""){
alert("Please Enter Your Name");
} else if(document.sendtof.friendname.value==""){
alert("Please Enter Your Friend Name");
} else if(em_val.test(document.sendtof.yourmail.value)==false){
alert("Your E-Mail is invalid e-mail address");
} else if(em_val.test(document.sendtof.friendmail.value)==false){
alert("Friend E-Mail is invalid e-mail address");
} else {
document.sendtof.submit();
}
}
//--------------------------------------------------
//--------------------------------------------------
//-----------COPYRIGHTS MEDIA WORKS---2007----------
//--------------------------------------------------
//--------------------------------------------------





