// JavaScript Document

function open_popup_page(pageid){
	 var url = 'popuppage.php?id='+pageid;
	 var ttl = 'Popup';
	 var params = 'status=yes, resizable=yes ,width=700px, height=600px, top=10px, left=10px, scrollbars=yes, resizable';
	 window.open(url, ttl, params);
}

function popitup(url) {
  newwindow=window.open(url,'name','height=230,width=350,scrollbars=no');
  if (window.focus) {newwindow.focus()}
  return false;
}

function check_down(){
 if (document.down_ff.sc.checked){
   return true
 }else{
   alert ("Please check the Successful field")
   return false
 }
 
}

function top_menu(m_imgid, m_imgnm, foldoption){  
  document.images[m_imgid].src = foldoption + "images/" + m_imgnm;
}

function news_check(){
	 
	 if(!validate_text(document.news_ff.fname,1,"Please enter your First Name")){
	    return false;
	 }
	 
	 if(!validate_text(document.news_ff.lname,1,"Please enter your Last Name")){
	    return false;
	 }
	 
	 if(!validate_email(document.news_ff.email,1,"Please enter your Email Address")){
	    return false;
	 }
	 
	 if(!validate_email(document.news_ff.re_email,1,"Please Confirm your Email")){
			 return false;
	 } 
	   
	 if (document.news_ff.email.value != document.news_ff.re_email.value){
		  alert ("Please enter your Email correctly");
		  document.news_ff.email.value = "";
		  document.news_ff.re_email.value = "";
		  document.news_ff.email.focus();
		  return false;
	 }
	 
	 if(!validate_text(document.news_ff.zip,1,"Please enter your ZipCode")){
	    return false;
	 } 
	 
	 if (document.news_ff.over14.checked == false){
		  alert ("Please certify that you are over 14 years of age");
		  return false;
	 }
	 
	 if(!validate_text(document.news_ff.captcha,1,"Please enter Validation String ")){
	    return false;
	 }
	
     return true;
}
