// JavaScript Document
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

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 Opencase(orderid){
  //alert('Hello');
  window.open('/caseview.asp?id='+orderid,'Order','top=0,left=0,width=750,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}
function Openprice(){
  //alert('Hello');
  window.open('/pricing2.asp','Pricing','top=0,left=0,width=600,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}
function Open090(){
  //alert('Hello');
  window.open('/pricing090.asp','Pricing','top=0,left=0,width=600,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}
function contact() {
window.opener.location.href='/?page=contact.asp';
window.setTimeout("window.close()",1000);
}
function ValidateTrial() {
	fail = 0;
	if (document.trialform.name.value == "") {
   		fail = 1;
	}
	if (document.trialform.company.value == "") {
   		fail = 1;
	}
	if (document.trialform.phone.value == "") {
   		fail = 1;
	}
	if (document.trialform.email.value == "") {
   		fail = 1;
	}
	if (fail == 1) {
		alert ('Please fill in all the fields and resubmit the form');
		return false;
	}
	return true;
}
function ValidateRecommend() {
	fail = 0;
	if (document.trialform.name1.value == "") {
   		fail = 1;
	}
	if (document.trialform.email1.value == "") {
   		fail = 1;
	}
	if (document.trialform.name2.value == "") {
   		fail = 1;
	}
	if (document.trialform.email2.value == "") {
   		fail = 1;
	}
	if (fail == 1) {
		alert ('Please fill in all the fields and resubmit the form');
		return false;
	}
	return true;
}

function ValidateTalk() {
	fail = 0;
	if (document.trialform.name.value == "") {
   		fail = 1;
	}
	if (document.trialform.company.value == "") {
   		fail = 1;
	}
	if (document.trialform.phone.value == "") {
   		fail = 1;
	}
	if (document.trialform.calltime.value == "") {
   		fail = 1;
	}
	if (fail == 1) {
		alert ('Please fill in all the fields and resubmit the form');
		return false;
	}
	return true;
}

function ValidateReseller() {
	fail = 0;
	if (document.trialform.name.value == "") {
   		fail = 1;
	}
	if (document.trialform.company.value == "") {
   		fail = 1;
	}
	if (document.trialform.address.value == "") {
   		fail = 1;
	}
	if (document.trialform.postcode.value == "") {
   		fail = 1;
	}
	if (document.trialform.day_tel.value == "") {
   		fail = 1;
	}
	if (document.trialform.email.value == "") {
   		fail = 1;
	}
	if (document.trialform.description.value == "") {
   		fail = 1;
	}
	if (document.trialform.products.value == "") {
   		fail = 1;
	}
	if (document.trialform.channels.value == "") {
   		fail = 1;
	}
	if (fail == 1) {
		alert ('Please fill in the mandatory fields and resubmit the form');
		return false;
	}
	return true;
}

function doIt()
{
	if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
	else return;

	if (self.screen.width < frameWidth *2 || self.screen.height < frameHeight *2)
	{
		parent.window.resizeTo(self.screen.width,self.screen.height);
		newWidth = 850;
		newHeight = 650;
		if (document.layers)
		{
			tmp1 = parent.outerWidth - parent.innerWidth;
			tmp2 = parent.outerHeight - parent.innerHeight;
			newWidth -= tmp1;
			newHeight -= tmp2;
			leftpos = (0);
			toppos = (0);
		}
		parent.window.resizeTo(850,newHeight);
		parent.window.moveTo(0,0);
	}
	else
	{
<!--		alert('No resize necessary');
	}
}

function mmLoadMenus() {
  if (window.mm_menu_1) return;
  window.mm_menu_1 = new Menu("root",250,15,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#000000","#999999","#CCCCCC","left","middle",3,0,250,-5,7,true,false,true,0,true,true);
  mm_menu_1.addMenuItem("What&nbsp;is&nbsp;Call&nbsp;Navigator?","location='?page=whatis.asp'");
  mm_menu_1.addMenuItem("What&nbsp;is&nbsp;Call&nbsp;Navigator&nbsp;IP?","location='http://www.callnavigatorip.co.uk'");
  mm_menu_1.addMenuItem("How&nbsp;will&nbsp;Call&nbsp;Navigator&nbsp;help&nbsp;my&nbsp;business?","location='?page=benefits.asp'");
  mm_menu_1.addMenuItem("Services","location='?page=products.asp'");
  mm_menu_1.addMenuItem("Pricing","location='?page=pricing.asp'");
  mm_menu_1.addMenuItem("Try&nbsp;before&nbsp;you&nbsp;buy","location='?page=freetrial.asp'");
  //mm_menu_1.bgImageUp="/images/menubgup.gif";
  //mm_menu_1.bgImageOver="/images/menubg.gif";
   mm_menu_1.hideOnMouseOut=true;
   mm_menu_1.menuBorder=0;
   mm_menu_1.menuLiteBgColor='#ffffff';
   mm_menu_1.menuBorderBgColor='#555555';
   mm_menu_1.bgColor='#555555';
   
  window.mm_menu_2 = new Menu("root",176,16,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#000000","#999999","#CCCCCC","left","middle",3,0,250,-5,7,true,false,true,0,true,true);
  mm_menu_2.addMenuItem("About&nbsp;Us","location='?page=aboutus.asp'");
  mm_menu_2.addMenuItem("Contact&nbsp;Us","location='?page=contact.asp'");
  //mm_menu_2.bgImageUp="/images/menubgup.gif";
  //mm_menu_2.bgImageOver="/images/menubg.gif";
   mm_menu_2.hideOnMouseOut=true;
   mm_menu_2.menuBorder=1;
   mm_menu_2.menuLiteBgColor='#ffffff';
   mm_menu_2.menuBorderBgColor='#555555';
   mm_menu_2.bgColor='#555555';

  mm_menu_2.writeMenus();
} // mmLoadMenus()
