				  var ben_val = "";
				  var state = 'none'; 
				  var elemnt_store; 
	function ShowImgOption(el_id)
		{		
			if(elemnt_store != el_id)
			{				
				elemnt_store = el_id;
				var state = 'none'; 
			}else{var state = 'block'; }
				
			if (state == 'block') { 
				
state = 'none'; 
} 
else { 
state = 'block'; 
} 

			if (document.getElementById) { 
		document.getElementById(el_id).style.display = state;
							 }else 
							   {
		if (document.layers) { 
			document.el_id.display = state;
							 }else 
							 		{
			document.all.el_id.style.display = state;
			 						}
								}
			
		}
		
		
		
function validateme(myex, uploaded_file_sz,field){
		 
		 	myex = myex.substring((myex.indexOf(".")+1),myex.length);	 	
	alert("I am validating the ext. \""+myex +"\". \n \nPlease wait...");	
	
	if(myex=="none") {
	   alert("Your file exceeds the Maximum size limit(20,000kb).\n Please reduce the file size or select an alternate file OR no file selected");
		ben_val = "FALSE";
		}
	
	if(uploaded_file_sz > 20000){
		alert("Your file exceeds the Maximum size limit(20,000kb).\n Please reduce the file size or select an alternate file.");
		ben_val = "FALSE";
	}
	
	if( myex == "gif" || myex == "jpg" || myex == "png" || myex == "bmp" 
	 || myex == "GIF" || myex == "JPG" || myex == "PNG" || myex == "BMP")
	{
		ben_val = "TRUE"
		 alert("Everything Checked Out \"OK\". \n Please proceed.")
	}else
			{
		
	alert("You must submit an image file in the following format:\n.jpg, .bmp, .gif OR .png")
	
		document.getElementById("ufclass").innerHTML="<Input TYPE=\"file\" id=\"uf\" NAME=\"userfile\" onchange=validateme(this.form.userfile.value,this.form.userfile.value.length,this.form.userfile)>"
		
		ben_val = "FALSE";	
			
			}
			return;
}


function infoval()
	{
				
var valuser = urimg.user.value
		if ((valuser == "") || (valuser == null))
			{
		alert("please enter your \"user name\".");
				urimg.user.focus;
		return 
			}		
var valfirst = urimg.first.value
		if ((valfirst == "") || (valfirst == null))
			{
		alert("please enter your \"first name\".");
				urimg.first.focus;
		return 
			}
var vallast = urimg.last.value
		if ((vallast == "") || (vallast == null))
			{
		alert("please enter your \"last name\".");
				urimg.last.focus;
		return 
			}	
		
var valpass = urimg.pass.value
		if ((valpass == "") || (valpass == null))
			{
		alert("please enter your \"password\".");
				urimg.pass.focus;
		return 
			}		
var valcpass = urimg.cpass.value
		if ((valcpass == "") || (valcpass == null))
			{
		alert("please confirm your \"password\".");
				urimg.cpass.focus;
		return 
			}				
		if (valpass != valcpass)
			{
		alert("please confirm your \"passwords\" match.");
				urimg.cpass.focus;
			return;
			}		
			submit_which_page();	
	}

	function submit_which_page(){
		
			var imgvaldteval =((ben_val == "TRUE") ? 1 : 0);
			var which_page = location.href;
which_page = which_page.substring(which_page.indexOf("login"),(which_page.indexOf("login")+5));
			urimg.action=(which_page  == "login" ? "login" : "register")+".php?ben_val="+imgvaldteval;
			urimg.submit();			
	}

	function areYouSure(msg)   {
		var bool = window.confirm(msg);
		return bool;
				     };
				     var pnffunc = location.search;
				     pnffunc = pnffunc.substring((pnffunc.indexOf('=')+1),pnffunc.length);
		     if(pnffunc == 1);
			 	  {     	
	if(function putinfocus(){document.usrlogn.user.focus()});
				  }
