function popup(url) 
{
 var width  = 700;
 var height = 2500;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function refreshCaptcha()
{
	var img = document.images['captchaimg'];
	img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
}




function valid()

{
    if(document.f1.user.value == "")
	{
	alert("Please Enter Name ");
	document.f1.user.focus();
	return false;
	}
  
	var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
str = document.f1.emailaddress.value;

if(!str.match(emailRegEx))

{
alert("Please Enter a valid Emailaddress");
document.f1.emailaddress.focus();
return false;
}
	
	   if(document.f1.comments.value == "")
	{
	alert("Please enter Feedback");
	document.f1.comments.focus();
	return false;
	}
	
	 if(document.f1.letters_code.value == "")
	{
	alert("Please enter the code");
	document.f1.letters_code.focus();
	return false;
	}
	
	/*var uword = hex_md5(document.getElementById(jfldid).value);

	if (uword==cword[anum-1]) {
	return true;
	}
	
	else {
	alert("ERROR: Enter the code as it is shown.");
	document.getElementById(jfldid).focus();
	return false;
	}*/
  
  return true;
}



