var win= null;
function popitup(url) {
	newwindow=window.open(url,'name','height=782,width=790');
	if (window.focus) {newwindow.focus()}
	return false;
}
function NewWindow(mypage)
	{
		var w=515
		var h=365
		var scroll='no';
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
		var settings ='height='+h+',';
		settings +='width='+w+',';
		settings +='top='+wint+',';
		settings +='left='+winl+',';
		settings +='scrollbars='+scroll+',';
		settings +='resizable=no'+',';
		settings +='status=0'+',';
		settings +='statusbar=0';
		win=window.open(mypage,'popup',settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
} 
function MM_openBrWindow(theURL,winName,features) 
{ 
	window.open(theURL,winName,features);
}
//onclick="NewWindow(this.href,'name','400','400','yes');return false

function findresut()
{
					if(document.myform.searchfact.value.length==0)
					{
							alert("Please enter Search Criteria");
							return false;
					}


					if (document.myform.select.value=="MRT" ||  document.myform.select.value=="PRT" || document.myform.select.value=="TRT")
					{
							
							document.myform.action="Ringtones_search.asp";
					}
					else if(document.myform.select.value=="SP")
					{
							document.myform.action="Wallpapers_search.asp";
					}
					else if(document.myform.select.value=="PM")
					{
							document.myform.action="animations_search.asp";
					}
					else if(document.myform.select.value=="THM")
					{
							document.myform.action="Themes_search.asp";
					}
					else if(document.myform.select.value=="MPM")
					{
							document.myform.action="Picture_search.asp";
					}
					else if(document.myform.select.value=="JGAME")
					{
							document.myform.action="Games_search.asp";
					}
						
							document.myform.submit();
}



function openPopUpmisc12(url,name,wt,ht)
{
	//var w=515
	//var h=365
	//ht=parseInt(ht)+1;
	//wt=parseInt(wt)+1;
	var winl = (screen.width-wt)/2;
	var wint = (screen.height-ht)/2;

window.open(url, name, 'toolbar=yes,location=no, directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,top=75,left=150,width=515,height=365,winl='+winl +',wint='+wint);
}

function openwindow(url)
{
var ht = parseInt(ht)+1;
var wt = parseInt(wt)+1;
var winl = (screen.width-wt)/2;
var wint = (screen.height-ht)/2;
window.open(url, "", 'toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,top=75,left=150,width='+wt + ',height='+ht +',winl='+winl +',wint='+wint);
}

 function validateform()
{
				if(document.commentform.ename.value.length==0)
				{
					alert("Please enter Name");
					return false;
				}
				if(document.commentform.fromn.value.length==0)
				{
					alert("Please enter Email Id");
					return false;
				}
				if(document.commentform.messagen.value.length==0)
				{
					alert("Please enter Comments");
					return false;
				}
				 if (document.commentform.fromn.value.indexOf("@") < 1) 
				{
					alert("Enter Valid Email Id");
					return false;
				} 
				else if (document.commentform.fromn.value.lastIndexOf(".") <= document.commentform.fromn.value.indexOf("@")) 
				{ 
					alert("Enter Valid Email Id");
					return false;
				} 
				else if (document.commentform.fromn.value.indexOf("@") == document.commentform.fromn.value.length) 
				{ 
					alert("Enter Valid Email Id");
					 return false;
				 }
				else if (document.commentform.fromn.value.indexOf("..") >=0) 
				 { 
					 alert("Enter Valid Email Id");
					return false;
				 }	
				else if (document.commentform.fromn.value.indexOf(".") == document.commentform.fromn.value.length)
				{ 
					alert("Enter Valid Email Id");
					return false;
				}
}
