	

var tabFlag = 0;
function changeTab(imgIndex, tabCount) {

	for (var i=0; i<tabCount; i++) {
	
		document.getElementById('div'+i).style.display = "none";
		document.getElementById('tab'+i).className = "tabOff"
	}

	document.getElementById('div'+imgIndex).style.display = "block";
	document.getElementById('tab'+imgIndex).className = "tabOn";
	tabFlag = imgIndex;
}


	function checkfield(){
		var yEmail = document.loginform.your_email.value;
		var yfEmail = document.loginform.friend_email1.value;
		var yatPos = yEmail.indexOf("@");
		var yatfpos = yEmail.indexOf(".");
		var yfatPos = yfEmail.indexOf("@");
		var yfatfpos = yfEmail.indexOf(".");
 
 
		if (document.loginform.your_name.value==""){
			alert("Enter your name");
			document.loginform.your_name.focus();
			return false;
		}
		if (document.loginform.your_email.value==""){
			alert("Enter your email");
			document.loginform.your_email.focus();
			return false;
		}
		else{
			if(yatPos == -1 || yatfpos == -1){ 
		alert("Please enter a valid e-mail address!");
		document.loginform.your_email.focus();
		return false; 
		}
		}
		
		if (document.loginform.friend_email1.value==""){
			alert("Enter your friend's email");
			document.loginform.friend_email1.focus();
			return false;
		}
		else{
			if(yfatPos == -1 || yfatfpos == -1){ 
		alert("Please enter a valid e-mail address!");
		document.loginform.friend_email1.focus();			
		return false; 
			}
		}
		if (document.loginform.message.value==""){
			alert("Please enter your message");
			document.loginform.message.focus();
			return false;
		}
	}

