if (navigator.appName == "Netscape") {
	document.write("<link rel='stylesheet' type='text/css' href='Templates/includes/style_ns.inc'>");
	} else {
	document.write("<link rel='stylesheet' type='text/css' href='Templates/includes/style_main.inc'>");
}

function WhiteSpace(search)
{
 if(search=="")
 {
 return true;
 }
 for(i=0;i<search.length;++i)
 {
  if (search.charAt(i)!="")
  return false;
 }
 return true;
}

function ValidSearch()
{
 if(document.form1.search.value.length=0 || WhiteSpace(document.form1.search.value))
 {
  alert("Please enter the keyword(s) to search for!");
  //document.form1.search.setfocus();
  return false;
 }
 return true;
}

function ValidSearchg()
{
 if(document.form.search.value.length=0 || WhiteSpace(document.form.search.value))
 {
  alert("Please enter the keyword(s) to search for!");
  //document.form1.search.setfocus();
  return false;
 }
 return true;
}

function ValidForm()
{
if (contact.name.value=="")
 {
 alert("Name is required field!");
 return false;
 }
 else
  {
  if (contact.org.value=="")
  {
  alert("Organization is required field!");
  return false;
  }
  else
   {
   if (contact.email.value=="")
   {
   alert("E-mail is required field!");
   return false;
   }
   else
   {
    if(contact.email.value.length<6) 
    { 
    alert("Sorry, your email address is not valid!"); 
    return false; 
    }
    if(contact.email.value.indexOf("@")==0) 
    { 
    alert("Sorry, your email address is not valid!"); 
    return false; 
    }
    if(contact.email.value.indexOf("@")==0) 
    { 
    alert("Sorry, your email address is not valid!"); 
    return false; 
    }
    if(contact.email.value.indexOf("@")==-1) 
    { 
    alert("Sorry, your email address is not valid!"); 
   return false; 
    }
    if(contact.email.value.indexOf(".")==-1) 
    { 
    alert("Sorry, your email address is not valid!"); 
    return false; 
    }
    if(-1 != contact.email.value.indexOf(" ")) 
    { 
    alert("Sorry, your email address is not valid!" ); 
    return false; 
   }
    if(contact.email.value.length == (contact.email.value.indexOf("@")+1) ) 
    {
    alert("Sorry, your email address is not valid!");
    return false;
    }
    if(contact.email.value.length == (contact.email.value.indexOf(".")+1) ) 
    {
    alert("Sorry, your email address is not valid!");
    return false;
    }
    {
    if (contact.question.value=="")
    {
    alert("Question/Comment is required field!");
    return false;
    }
   else
   {
   contact.status.value="OK"
   return true;
   }
   }
  }
 }
}
}

function ValidLogin()
{
 for (var i=0; i < document.form1.elements.length; i++)
{
   if (document.form1.elements[i].value=="")
   {
    alert("All fields are requireded!");
    return false;
   }
document.form1.flag.value="ok"
return true;
 }

}
function newWindow() {
	var lglMsg = 'You are accessing a private network. Access and use of this network is restricted.  '
		lglMsg += 'All information accessed through this network is confidential and proprietary ';
		lglMsg += 'to ACE Limited or one or more of its subsidiaries. The network is monitored ';
		lglMsg += 'for unauthorized access and evidence of illegal activity. Unauthorized access ';
		lglMsg += 'and evidence of illegal activity will be reported to law enforcement authorities. ';
		lglMsg += 'Messages and other documents may be reviewed by management when authorized by ';
		lglMsg += 'the creator or receiver, where a business related need exists, when required ';
		lglMsg += 'by regulatory or legal authority, or when requested by counsel to protect the ';
		lglMsg += 'interests of our corporation. The network is to be used for business purposes.  ';
		lglMsg += 'Transmission of words or images that are: threatening, obscene, racial or ';
		lglMsg += 'sexual in nature, in violation of corporate policies on e-mail, sexual ';
		lglMsg += 'harassment or equal opportunity or data security, may subject the user to ';
		lglMsg += 'disciplinary action including discharge.';
	var e = confirm(lglMsg)
	if (e) mailWindow = window.open('https://owa.ace-ina-canada.com/owa', 'mailwindow','width='+screen.width+',height='+screen.height+',left=0,top=0,screenX=0,screenY=0,resizable=yes,titlebar=no,location=100');
		}
function chk_Print() 
{ 
var pr=document.getElementById('btPrint'); 
if(btPrint!=null){btPrint.style.visibility='hidden';} 
window.print(); 
if(btPrint!=null){btPrint.style.visibility='visible';} 
}