// JavaScript Document
<!--	
function imagePopUp(img,title,w,h) {
  html = "<html><head><title>" + title + "</title>" + "</head><body style=\"margin: 0px 0; text-align:center; \">" + "<IMG src='" + img + "' border=0 name=image " + "onload='window.resizeTo(document.image. " + w + ",(document.image." + h + "*1.3))'>" + "</body></html>"; 
  popup = window.open('','image','height=' + h + ',width=' + w + ',resizable=no,status=no,toolbar=no,location=no,scrollbars=no'); 
  popup.document.open(); 
  popup.document.write(html); 
  //popup.document.focus(); 
  popup.document.close();
};

function welm(sName)
{
  var name = sName
  var domain = "zocalo-tech.com"
  document.write("<a href='mailto:" + name + "@" + domain + "'>")
  document.write(name + "@" + domain)
  document.write("</a>")
}
function invalidelm(elm) {
  elm = elm.toLowerCase();
  if (elm.match("@hotmail.com")) return true;
  if (elm.match("@gmail.com")) return true;
  if (elm.match("@yahoo.com")) return true;
  if (elm.match("@gmx.com")) return true; 
  if (elm.match("@aim.com")) return true; 
  if (elm.match("@zenbe.com")) return true; 
  if (elm.match("@gawab.com")) return true; 
  if (elm.match("@inbox.com")) return true; 
  if (elm.match("@fastmail.com")) return true; 
  if (elm.match("@msn.com")) return true; 
  if (elm.match("@rdiffmail.com")) return true;
  return false;
}
function openwindow()
{
  window.open("http://www.zocalo-tech.com/licensedemo.php","mywindow","menubar=0,resizable=1,width=760,height=560");
}
function privacy() 
{
  newWindow = window.open('http://www.cmitsolutions.com/spam/privacy.htm','_privacy','height=365,width=450,resizable=no,status=no,toolbar=no,location=no,scrollbars=no');
}
function errorpop(inhtm) {
  var width = 350;
  var height = 300;
  var left = parseInt((screen.availWidth/2) - (width/2));
  var top = parseInt((screen.availHeight/2) - (height/2));
  var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
  var text = '<p>Please fill out the missing required fields marked in <span style="color:red;">red text</span>.</p>';
      text += 'The missing fields are:<ul>';
      text += inhtm + '</ul><br>';	
  myWindow = window.open("Missing required fields", "mywindow1", windowFeatures);
  myWindow.document.write(text); 
}
function agreement_pop() {
  var width = 350;
  var height = 100;
  var left = parseInt((screen.availWidth/2) - (width/2));
  var top = parseInt((screen.availHeight/2) - (height/2));
  var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;	
  var text = '<p><span style="color:red;">You must accept the terms and conditions to download an evaluation copy of our software.</span></p>';
  my_window= window.open ("Accept the terms and conditions","mywindow1",windowFeatures); 
  my_window.document.write(text); 
}
function testvalid() {
  o_isclicked = document.getElementById("id_isclicked");
  o_isclicked.value = 'ok';
}
function checkform() {
  var results = 1;
  var inhtm = '';
  o_isclicked = document.getElementById("id_isclicked"); 
  oe_required = document.getElementById("ide_required");
  o_firstname = document.getElementById("id_firstname");
  oe_firstname = document.getElementById("ide_firstname");
  o_lastname = document.getElementById("id_lastname");
  oe_lastname = document.getElementById("ide_lastname");
  o_email = document.getElementById("id_email");
  oe_email = document.getElementById("ide_email");  
	
  oe_required.style.color = "black";
  oe_firstname.style.color = "black"; 
  oe_lastname.style.color = "black";
  oe_email.style.color = "black";  

  if (o_firstname.value == "") {
    oe_firstname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">First Name</span></li>';	  
    results = 0;
  }
  if (o_lastname.value == "") {
    oe_lastname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Last Name</span></li>';	  
    results = 0;
  }
  if (o_email.value == "") {
    oe_email.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Email Address</span></li>';	  
    results = 0;
  } 
  
  if (results == 0) 
  {
    o_isclicked.value = '';
	errorpop(inhtm); 
    return false;
  }

  return true;
}
function checkzazzdownload() {
  var results = 1;
  var inhtm = '';
  o_isclicked = document.getElementById("id_isclicked"); 
 
  if ((!(document.fm_zdn.os[0].checked)) && (!(document.fm_zdn.os[1].checked))) {
    inhtm += '<li><span style="color:red;">You must select either RedHat or SUSE as your operating system</span></li>';
    results = 0;
  }
 
  if (results == 0) {
    o_isclicked.value = '';
	errorpop(inhtm); 
    return false;
  }
  return true;
}
function checkdownload() {
  var results = 1;
  var inhtm = '';
  o_isclicked = document.getElementById("id_isclicked"); 
  oe_required = document.getElementById("ide_required");
  o_firstname = document.getElementById("id_firstname");
  oe_firstname = document.getElementById("ide_firstname");
  o_lastname = document.getElementById("id_lastname");
  oe_lastname = document.getElementById("ide_lastname");
  o_phone = document.getElementById("id_phone");
  oe_phone = document.getElementById("ide_phone"); 
  o_company = document.getElementById("id_company");
  oe_company = document.getElementById("ide_company");
  o_email = document.getElementById("id_email");
  oe_email = document.getElementById("ide_email"); 
  oe_os = document.getElementById("ide_os");   
	
  oe_required.style.color = "black";
  oe_firstname.style.color = "black"; 
  oe_lastname.style.color = "black";
  oe_phone.style.color = "black";
  oe_company.style.color = "black";   
  oe_email.style.color = "black"; 
  oe_os.style.color = "black"; 
	
  if (o_firstname.value == "") {
    oe_firstname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">First Name</span></li>';	  
    results = 0;
  }
  if (o_lastname.value == "") {
    oe_lastname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Last Name</span></li>';	  
    results = 0;
  }  
  if (o_phone.value == "") {
    oe_phone.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Telephone</span></li>';	  
    results = 0;
  }
  if (o_company.value == "") {
    oe_company.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Company</span></li>';	  
    results = 0;
  }  
  if (o_email.value == "") {
    oe_email.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Email Address</span></li>';	  
    results = 0;
  }
  
  if ((!(document.fm.fm_os[0].checked)) && (!(document.fm.fm_os[1].checked))) {
    oe_os.style.color = "red";
	oe_required.style.color = "red";	  
    inhtm += '<li><span style="color:red;">You must select either RedHat or SUSE as your operating system</span></li>';
    results = 0;
  }
  
  if ( (o_email.value != "") && (invalidelm(o_email.value)) ) {
	o_isclicked.value = '';
	inhtm += '<li><span style="color:red;">We cannot accept emails from anonymous email servers such as yahoo.com, hotmail.com, etc. Your email address must be affiliated with a company.</span></li>';
    results = 0;
  } 
  
  if (results == 0) {
    o_isclicked.value = '';
	errorpop(inhtm); 
    return false;
  }

  if(!agreed()) {
    agreement_pop();
    return false;
  }
  else return true;
}
function checkwp() {
  var results = 1;
  var inhtm = '';
  o_isclicked = document.getElementById("id_isclicked"); 
  oe_required = document.getElementById("ide_required");
  o_firstname = document.getElementById("id_firstname");
  oe_firstname = document.getElementById("ide_firstname");
  o_lastname = document.getElementById("id_lastname");
  oe_lastname = document.getElementById("ide_lastname");
  o_company = document.getElementById("id_company");
  oe_company = document.getElementById("ide_company");
  o_email = document.getElementById("id_email");
  oe_email = document.getElementById("ide_email"); 
  
  oe_required.style.color = "black";
  oe_firstname.style.color = "black"; 
  oe_lastname.style.color = "black";
  oe_company.style.color = "black"; 
  oe_email.style.color = "black"; 
  
  if (o_firstname.value == "") {
    oe_firstname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">First Name</span></li>';	  
    results = 0;
  }
  if (o_lastname.value == "") {
    oe_lastname.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Last Name</span></li>';	  
    results = 0;
  }  
  if (o_company.value == "") {
    oe_company.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Company</span></li>';	  
    results = 0;
  }  
  if (o_email.value == "") {
    oe_email.style.color = "red";
	oe_required.style.color = "red";
    inhtm += '<li><span style="color:red;">Email Address</span></li>';	  
    results = 0;
  }
  
  if ( (o_email.value != "") && (invalidelm(o_email.value)) ) {
	inhtm += '<li><span style="color:red;">We cannot accept emails from anonymous email servers such as yahoo.com, hotmail.com, etc. Your email address must be affiliated with a company.</span></li>';
    results = 0;
  } 
  
  if (results == 0) {
	errorpop(inhtm); 
    return false;
  }
  
  return true;
}
function checklicreq() {
  var results = 1;
  var inhtm = '';
  
  o_isclicked = document.getElementById("id_isclicked"); 
  o_hostid = document.getElementById("id_hostid");
  oe_hostid = document.getElementById("ide_hostid");
  o_actkey = document.getElementById("id_actkey");
  oe_actkey = document.getElementById("ide_actkey");	
  
  oe_hostid.style.color = "black"; 
  oe_actkey.style.color = "black";
	
  if (o_hostid.value == "") {
    oe_hostid.style.color = "red";
    inhtm += '<li><span style="color:red;">Host Id:</span></li>';	  
    results = 0;
  }
  if (o_actkey.value == "") {
    oe_actkey.style.color = "red";
    inhtm += '<li><span style="color:red;">Activation Key:</span></li>';	  
    results = 0;
  } 	
  if (results == 0) {
    o_isclicked.value = '';
	errorpop(inhtm); 
    return false;
  }
  return true;
}
function agreed() {
  if (document.fm.agree.checked == true) return true;
  else return false;
}
//-->