function open_win(url_add){
   window.open(url_add,'detail','left=15, top=15, scrollbars=yes, width=500, height=500');
}
function enableit1(id,count)
{	
	var temp;
	for(var i=0;i<count;i++)
	{
		temp=document.getElementById("ckeckbid"+i);
		temp.disabled=true;
		temp.checked=false;
		temp=document.getElementById("ckeckid"+i);
		temp.disabled=true;
		temp.checked=false;
		temp=document.getElementById("catalogpages"+i);
		temp.disabled=true;
		temp=document.getElementById("conentpages"+i);
		temp.disabled=true;
	}
	var temp=document.getElementById("ckeckbid"+id);
	temp.disabled=false;
	var temp=document.getElementById("ckeckid"+id);
	temp.disabled=false;
}
function enableit(ida,count)
{	
	var boxa=document.getElementById(ida);			
	if(boxa.disabled)
		boxa.disabled=false;
	else
		boxa.disabled=true;
}
function checkemail(){
	var temp=document.getElementById("email");
	temp.value=temp.value.toLowerCase();
	var str="^([0-9a-zA-Z]+[-._+&amp;])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$";
	var exp=new RegExp(str);
	if(!temp.value.match(exp)){
		var thatdiv=document.getElementById('msg');
   		thatdiv.innerHTML="Invalid E-mail ID";
		document.getElementById("userName").value=temp.value;
		document.myform.email.focus();
   		return false;
	}
	var url="/domain/checkemail.html";
	var content="email="+temp.value;
	document.getElementById("userName").value=temp.value;
	new Ajax.Updater('msg', url, {method: 'post', parameters: content,onComplete:function() 
		{
			if(document.getElementById('msg').innerHTML.indexOf("E-MAIL ALREADY EXIST")>0||document.getElementById('msg').innerHTML.indexOf("FIELD CAN NOT BE BLANK")>0)
			{
				document.getElementById("userName").value=temp.value;
				document.myform.email.focus();
			}
			document.getElementById("userName").value=temp.value;
		}
	});	
}