
function show(id) {
	//alert("expand:"+id);
	id = document.getElementById(id);
	id.style.display = "";
}

function hide(id) {
	id = document.getElementById(id);
	id.style.display = "none";
}

function delayShow(id) {
	method='show(\''+id+'\')';
	setTimeout(method,300);
}

function showWinner(count) {
	//alert("showWinner:"+count);
	var id = document.getElementById("div_"+count);
	//alert("id :"+id);
	if ( id != null )
		id.style.display = "";
	openId = document.getElementById("open_"+count);
	if ( openId != null )
		openId.style.display = "none";
	closeId = document.getElementById("close_"+count);
	if ( closeId != null )
		closeId.style.display = "";
	//alert("showWinner:"+count);
	
	//alert("showWinner:"+count);
	
}

function hideWinner(count) {
	//alert("hideWinner:"+count);
	id = document.getElementById("div_"+count);
	id.style.display = "none";
	closeId = document.getElementById("close_"+count);
	closeId.style.display = "none";
	openId = document.getElementById("open_"+count);
	openId.style.display = "";
	
}

function hideAllWinner() {
	var divList = winnerArray;
	
	
	//alert("divList.length = "+divList.length);
	//alert("divList.id  = "+divList[0].id);
	//alert("divList :"+divList);
	//alert(nameList);
	for(var i =0;i<=divList.length ;i++){
		
		id = document.getElementById("div_"+divList[i]);
		id.style.display = "none";
		closeId = document.getElementById("close_"+divList[i]);
		closeId.style.display = "none";
		openId = document.getElementById("open_"+divList[i]);
		openId.style.display = "";
	}
	
}
function showAllWinner() {
	//alert("winnerArray :"+winnerArray.length);
	var divList = winnerArray;
	
	//alert("divList :"+document.getElementById("div_1"));
	//alert("divList :"+divList.length);
	
		for(var i =0;i<=divList.length;i++){
		id = document.getElementById("div_"+divList[i]);
		
		id.style.display = "";
		closeId = document.getElementById("close_"+divList[i]);
		closeId.style.display = "";
		openId = document.getElementById("open_"+divList[i]);
		openId.style.display = "none";
		}
}

function isEmailFormatInCorrect(email)
{
    if (email.charAt(0)=="." ||        
         email.charAt(0)=="@"||       
         email.indexOf('@', 0) == -1 || 
         email.indexOf('.', 0) == -1 || 
         email.lastIndexOf("@")==email.length-1 || 
         email.lastIndexOf(".")==email.length-1)
     {
          return true;
     }

   return false;
} 