﻿

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function opennewwin()
{
	window.open("julydiscount.htm","July_special_discount","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=yes,width=260,height=250");
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		/*id1_top = newImage("/includes/images/button_tell_on.gif");
		id2_top = newImage("/includes/images/button_map_on.gif");
		id3_top = newImage("/includes/images/button_search_on.gif");
		id4_top = newImage("/includes/images/button_cart_on.gif");
		id1_bot = newImage("/includes/images/nav_1_on.gif");
		id2_bot = newImage("/includes/images/nav_2_on.gif");
		id2a_bot = newImage("/includes/images/nav_2a_on.gif");
		id2b_bot = newImage("/includes/images/nav_2b_on.gif");
		id2c_bot = newImage("/includes/images/nav_2c_on.gif");
		id3_bot = newImage("/includes/images/nav_3_on.gif");
		id4_bot = newImage("/includes/images/nav_4_on.gif");
		id5_bot = newImage("/includes/images/nav_5_on.gif");*/
		preloadFlag = true;
	}
}
onload=preloadImages;


function ShowDiv(divId)
{
	var id = document.getElementById(divId);
	if (id.style.display == "none")
	{
		eval("id.style.display = 'block'");
	}
}

function ShowHide(divId)
{
	var thisid = document.getElementById(divId);
	var thisdivId = thisid.id;
	if (thisid.style.display == "none")
	{
		eval("thisid.style.display = 'block';");
		/*if (document.images) { 
                document.images["jID"+counter].src = eval('sm_plus_on.src'); 
        }*/
		for (var i = 0; i < document.all.tags("div").length; i++)
		{
			var otherdivId = document.all.tags("div")[i].id;
			var otherdivname;
			
			otherdivname = otherdivId.substring(2,5);
			if (otherdivname != "cat" && (otherdivId != thisdivId))
			{
				//document.getElementById(otherdivId).style.display = 'none';
				//alert(eval("document.all." + otherdivId + ".style.display = 'none';"));
			}
		}
	}
	else
	{
		eval("thisid.style.display = 'none';");
		//document.images["jID"+counter].src = eval('sm_plus_off.src'); 
	}
	
}

function ShowHideCat(divId, counter)
{
	var thisid = document.getElementById(divId+counter);
	var thisdivId = thisid.id;
	if (thisid.style.display == "none")
	{
		eval("thisid.style.display = 'block';");
		if (document.images) { 
                document.images["iID"+counter].src = eval('plus_on.src'); 
        }
		for (var i = 0; i < document.all.tags("div").length; i++)
		{
			var otherdivId = document.all.tags("div")[i].id;
			var count;
			var otherdivname;
			
			otherdivname = otherdivId.substring(2,5);
			if ((otherdivname == "cat") && (otherdivId != thisdivId))
			{
				/*document.getElementById(otherdivId).style.display = 'none';
				count = otherdivId.substring(5, otherdivId.length);
				if (document.images["iID"+count] != null)
				{
					document.images["iID"+count].src = eval('plus_off.src'); 
				}*/
				//alert(eval("document.all." + otherdivId + ".style.display = 'none';"));
			}
		}
	}
	else
	{
		eval("thisid.style.display = 'none';");
		document.images["iID"+counter].src = eval('plus_off.src'); 
	}
	
}

function email()
{
  var locn =document.location+'';
  var openPage;
  
  lgth = locn.indexOf('?');
  if(lgth != -1)
  {
     locn = locn.substring(0,lgth);
  }
  openPage= "http://consumer.execsoft.com/tellafriend/emailpage.asp?pagebrw="+locn;
  
  
  window.open(openPage,"TellAFriend","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=no,width=428,height=460");
}

function addhelp(help, id, pageurl)
{
  /*if (help == "-1")
  {
	window.open("mailto:"+email+"?subject="+subj,"email","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=no,width=428,height=460");
  }*/
  window.location="/Support/AddHelp.aspx?help="+help+"&id="+id+"&purl="+pageurl;
}

function addhelpwiz(email, subj, help, id, pageurl)
{
  if (help == "-1")
  {
	window.open("mailto:"+email+"?subject="+subj,"email","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=no,width=428,height=460");
  }
  window.location="/Support/AddHelp.aspx?help="+help+"&id="+id+"&purl="+pageurl;
}


<!--

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function init() {
	if (ns4) block = document.blockDiv
	if (ie4) block = blockDiv.style
	hideObject(block)
}

// Show/Hide functions for pointer objects

function showObject(obj) {
	if (ns4) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}

function hideObject(obj) {
	if (ns4) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}

//-->


var turnon=0; //setting turnon which determines if the quote should be displayed or not
var max1=1; // the number of banners to be rotated for diskeeper 
var max2=1; // the number of banners to be rotated for undelete
var max3=1; // the number of banners to be rotated for sitekeeper
var max4 = 3;//the number of banners to be rotated for all products
var thisBanner=1; // initially banner 1
var category =1;

function MakeBannerArray(n)
{
	this.length=n;
	for (var i=1; i<=n;i++)
		{
		this[i]="";
		}
	return this;
}
	
// then populate the array with the banner links and file path	
if (category == "1")
{		
	// create an array of banners
	var banner=new MakeBannerArray(max1);

	banner[1]='<img src="/images\/quotes\/dk_roland_chinatti.gif" alt="animated gif" border="0">';

}
else if (category == "2")
{
	// create an array of banners
	var banner=new MakeBannerArray(max2);

	banner[1]='<img src="/images\/quotes\/ud_arthur_hensler.gif" alt="animated gif" border="0">';

	
}
else if (category == "3")
{
  	// create an array of banners
	var banner=new MakeBannerArray(max3);
	
	banner[1]='<img src="/images\/quotes\/sk_craig_williamson.gif" alt="animated gif" border="0">';
	
}
else if (category == "4")
{
  	// create an array of banners
	var banner=new MakeBannerArray(max4);
	
	banner[1]='<img src="/images\/quotes\/dk_roland_chinatti.gif" alt="animated gif" border="0">';
	banner[2]='<img src="/images\/quotes\/ud_arthur_hensler.gif" alt="animated gif" border="0">';
	banner[3]='<img src="/images\/quotes\/sk_craig_williamson.gif" alt="animated gif" border="0">';

}

// the random number function returns a number 1 to max
function rand(n)
	{
	rnum=Math.floor(n*Math.random())+1
	return rnum;
	}
		

// the function that is called from the body script
//This is called on pages which need both diskeeper and undelete
function setBanner()
	{
		if (category == "1")
		{
		   thisBanner=rand(max1);
		   	
		}
		else if (category == "2")
		{
		   thisBanner=rand(max2);
		}
		else if (category == "3")
		{
		   thisBanner=rand(max3);
		}
		else if (category == "4")
		{
		   thisBanner=rand(max4);
		}
		
	}

function URLShow() {
	document.location = document.frminternational.lstInternational.options[document.frminternational.lstInternational.options.selectedIndex].value;	
}

function ValidateM()
{
			
	if (document.thisForm.SearchString2.value == "") 
	{
	  alert("Please enter the string you wish to search for.");
	  document.thisForm.SearchString2.focus();
	  return false;
	}
	document.thisForm.action="http://www.execsoft.com/tech-support/knowledgebase/sitesearchresults.aspx";
	document.thisForm.goSearch.value="True";
	document.thisForm.submit();	
			  	
}
		
function SubMe()
{
	if (window.event.keyCode ==13)
	  ValidateM();
}

function ShowSearch()
{
	if (sValidate())
	{
		document.searchForm.action="http://www.execsoft.com/site-search/search.asp"
		document.searchForm.method="POST"
		document.searchForm.goBtn.value = "True"
		document.searchForm.vTypeSearch.value=document.searchForm.TypeSearch.options[document.searchForm.TypeSearch.selectedIndex].value
		document.searchForm.submit();
	}
}

function sSubmitMe(evnt)
{
	if (navigator.appName=="Netscape") 
	{
		if (evnt.which==13)
		{
			document.searchForm._method.value=""; 
			ShowSearch();
		}
	}
	else
	{
		if (window.event.keyCode == 13)
			ShowSearch();
	}
}

function sValidate()
{
	if (document.searchForm.SearchString.value =="")
	{
		alert("Please enter something to search for.");
		document.searchForm.SearchString.focus();
		return false;
	}
	return true;
}

function validateTech()
{
	if (document.supportForm.selOS.options[document.supportForm.selOS.selectedIndex].value == "")
	{
		alert("Please enter the Operating system on which you have our product installed.");
		document.supportForm.selOS.focus();
	}
	else if (document.supportForm.selProduct.options[document.supportForm.selProduct.selectedIndex].value == "")
	{
		alert("Please enter the Product name and version.");
		document.supportForm.selProduct.focus();
	}
	else if(document.supportForm.txtReg.value == "")
	{
		alert("Please enter the registration number.");
		document.supportForm.txtReg.focus();
	}
	else if(document.supportForm.txtDesc.value == "")
	{
		alert("Please enter a description here.");
		document.supportForm.txtDesc.focus();
	}
	else
	{
		document.supportForm.action="thankyou.asp";
		document.supportForm.submit();
	}
	
}

function setDownload()
{
	document.dlform.hddownload.value = download;

	document.dlform.action="/smallbiz/profile/Getprofile.asp";

	document.dlform.submit();

}

//Checking if this is an integer
function isInteger(s){
    var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function validateSKStePurchase()
{
	if (!isInteger(document.thisform.txtSuite.value))
	{
		document.thisform.txtSuite.value = 0;
	}
	document.thisform.hdnSte.value="PriceIt"	

	document.thisform.submit();
}

function validateSKPurchase()
{
	if (!isInteger(document.thisform.txtPush.value))
	{
		document.thisform.txtPush.value = 0;
	}
	if (!isInteger(document.thisform.txtInventory.value))
	{
		document.thisform.txtInventory.value = 0;
	}
	document.thisform.hdninv.value="PriceIt"

	document.thisform.submit();
}

function validateDKPurchase()
{
	if (document.thisform.txtDKStd.value == "")
	{	
		document.thisform.txtDKStd.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKStd.value))
	{
		document.thisform.txtDKStd.value = 0;
	}
	if (document.thisform.txtDKStdUpg.value == "")
	{	
		document.thisform.txtDKStdUpg.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKStdUpg.value))
	{
		document.thisform.txtDKStdUpg.value = 0;
	}
	if (document.thisform.txtDKEnt.value == "")
	{	
		document.thisform.txtDKEnt.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKEnt.value))
	{
		document.thisform.txtDKEnt.value = 0;
	}
	if (!isInteger(document.thisform.txtDKEntUpg.value))
	{
		document.thisform.txtDKEntUpg.value = 0;
	}
	if (document.thisform.txtDKEntUpg.value == "")
	{	
		document.thisform.txtDKEntUpg.value = 0;	
	}
	
	if (document.thisform.txtDKAdmin.value == "")
	{	
		document.thisform.txtDKAdmin.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKAdmin.value))
	{
		document.thisform.txtDKAdmin.value = 0;
	}
	
	if (document.thisform.txtDKPro.value == "")
	{		
		document.thisform.txtDKPro.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKPro.value))
	{
		document.thisform.txtDKPro.value = 0;
	}
	if (document.thisform.txtDKProUpg.value == "")
	{		
		document.thisform.txtDKProUpg.value = 0;	
	}
	if (!isInteger(document.thisform.txtDKProUpg.value))
	{
		document.thisform.txtDKProUpg.value = 0;
	}
	
	document.thisform.submit();
}

function validateDKProPurchase(Pro, Server, Admin)
{
	document.thisform.ProEdition.value='Professional';
	
	if (Server == 1)
	{
		if (document.thisform.txtDKStd.value == "")
		{	
			document.thisform.txtDKStd.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKStd.value))
		{
			document.thisform.txtDKStd.value = 0;
		}
		if (document.thisform.txtDKEnt.value == "")
		{	
			document.thisform.txtDKEnt.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKEnt.value))
		{
			document.thisform.txtDKEnt.value = 0;
		}
		
		/*if (document.thisform.txtDKWeb.value == "")
		{		
			document.thisform.txtDKWeb.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKWeb.value))
		{
			document.thisform.txtDKWeb.value = 0;
		}*/
	}
	if (Admin == 1)
	{
		if (document.thisform.txtDKAdmin.value == "")
		{	
			document.thisform.txtDKAdmin.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKAdmin.value))
		{
			document.thisform.txtDKAdmin.value = 0;
		}
	}
	if (Pro == 1)
	{
		if (document.thisform.txtDKPro.value == "")
		{		
			document.thisform.txtDKPro.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKPro.value))
		{
			document.thisform.txtDKPro.value = 0;
		}
	}
	document.thisform.submit();
}

function validateDKAdminPurchase(Pro, Server, Admin)
{
	document.thisform.AdminEdition.value='Admin';
	
	if (Server == 1)
	{
		if (document.thisform.txtDKStd.value == "")
		{	
			document.thisform.txtDKStd.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKStd.value))
		{
			document.thisform.txtDKStd.value = 0;
		}
		if (document.thisform.txtDKEnt.value == "")
		{	
			document.thisform.txtDKEnt.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKEnt.value))
		{
			document.thisform.txtDKEnt.value = 0;
		}
		
		/*if (document.thisform.txtDKWeb.value == "")
		{		
			document.thisform.txtDKWeb.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKWeb.value))
		{
			document.thisform.txtDKWeb.value = 0;
		}*/
	}
	if (Admin == 1)
	{
		if (document.thisform.txtDKAdmin.value == "")
		{	
			document.thisform.txtDKAdmin.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKAdmin.value))
		{
			document.thisform.txtDKAdmin.value = 0;
		}
	}
	if (Pro == 1)
	{
		if (document.thisform.txtDKPro.value == "")
		{		
			document.thisform.txtDKPro.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKPro.value))
		{
			document.thisform.txtDKPro.value = 0;
		}
	}
	document.thisform.submit();
}

function validateDKSvrPurchase(Pro, Server, Admin)
{
	document.thisform.SvrEdition.value='Server';
	
	if (Server == 1)
	{
		if (document.thisform.txtDKStd.value == "")
		{	
			document.thisform.txtDKStd.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKStd.value))
		{
			document.thisform.txtDKStd.value = 0;
		}
		if (document.thisform.txtDKEnt.value == "")
		{	
			document.thisform.txtDKEnt.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKEnt.value))
		{
			document.thisform.txtDKEnt.value = 0;
		}
		
		/*if (document.thisform.txtDKWeb.value == "")
		{		
			document.thisform.txtDKWeb.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKWeb.value))
		{
			document.thisform.txtDKWeb.value = 0;
		}*/
	}
	if (Admin == 1)
	{
		if (document.thisform.txtDKAdmin.value == "")
		{	
			document.thisform.txtDKAdmin.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKAdmin.value))
		{
			document.thisform.txtDKAdmin.value = 0;
		}
	}
	if (Pro == 1)
	{
		if (document.thisform.txtDKPro.value == "")
		{		
			document.thisform.txtDKPro.value = 0;	
		}
		if (!isInteger(document.thisform.txtDKPro.value))
		{
			document.thisform.txtDKPro.value = 0;
		}
	}
	document.thisform.submit();
		
}


function removeDK(DKEdition, DKId)
{
	document.thisform.action = "diskeeper.asp?Product="+DKEdition+"&Remove="+DKId+"#price";
	document.thisform.submit();

}

function validateUDPurchase()
{
	
	if (document.thisform.txtUDStd.value == "")
	{	
		document.thisform.txtUDStd.value = 0;	
	}
	if (!isInteger(document.thisform.txtUDStd.value))
	{
		document.thisform.txtUDStd.value = 0;
	}
	if (document.thisform.txtUDPro.value == "")
	{		
		document.thisform.txtUDPro.value = 0;	
	}
	if (!isInteger(document.thisform.txtUDPro.value))
	{
		document.thisform.txtUDPro.value = 0;
	}
	if (document.thisform.txtUDStdUpg.value == "")
	{	
		document.thisform.txtUDStdUpg.value = 0;	
	}
	if (!isInteger(document.thisform.txtUDStdUpg.value))
	{
		document.thisform.txtUDStdUpg.value = 0;
	}
	if (document.thisform.txtUDProUpg.value == "")
	{		
		document.thisform.txtUDProUpg.value = 0;	
	}
	if (!isInteger(document.thisform.txtUDProUpg.value))
	{
		document.thisform.txtUDProUpg.value = 0;
	}
	document.thisform.submit();
		
}

function validateUDProPurchase(Pro, Server)
{
	document.thisform.ProEdition.value='Professional';
	
	if (Server == 1)
	{
		if (document.thisform.txtUDStd.value == "")
		{	
			document.thisform.txtUDStd.value = 0;	
		}
		if (!isInteger(document.thisform.txtUDStd.value))
		{
			document.thisform.txtUDStd.value = 0;
		}
		
	}
	if (Pro == 1)
	{
		if (document.thisform.txtUDPro.value == "")
		{		
			document.thisform.txtUDPro.value = 0;	
		}
		if (!isInteger(document.thisform.txtUDPro.value))
		{
			document.thisform.txtUDPro.value = 0;
		}
	}
	document.thisform.submit();
}

function validateUDSvrPurchase(Pro, Server)
{
	document.thisform.SvrEdition.value='Server';
	
	if (Server == 1)
	{
		if (document.thisform.txtUDStd.value == "")
		{	
			document.thisform.txtUDStd.value = 0;	
		}
		if (!isInteger(document.thisform.txtUDStd.value))
		{
			document.thisform.txtUDStd.value = 0;
		}
	}
	if (Pro == 1)
	{
		if (document.thisform.txtUDPro.value == "")
		{		
			document.thisform.txtUDPro.value = 0;	
		}
		if (!isInteger(document.thisform.txtUDPro.value))
		{
			document.thisform.txtUDPro.value = 0;
		}
	}
	document.thisform.submit();
		
}

function removeUD(UDEdition, UDId)
{
	document.thisform.action = "undelete.asp?Product="+UDEdition+"&Remove="+UDId+"#price";
	document.thisform.submit();

}

function validateDKOS()
{
	var options_string = "";

	for (loop=0; loop < (document.thisform.selOS.options.length); loop++)
	{
		if (document.thisform.selOS.options[loop].selected == true)
		{
			options_string += document.thisform.selOS.options[loop].text + " ";
		}
	}

	if (options_string == "")
	{
		alert("Please enter the Server Operating Systems you have.");
	}
	else
	{
		document.thisform.submit();
	}

}

function validateMaintPurchase()
{
	if ((document.thisform.txtDKPro.value == "") || !isInteger(document.thisform.txtDKPro.value))
	{
		document.thisform.txtDKPro.value = 0;
	}
	if ((document.thisform.txtDKStd.value == "") || !isInteger(document.thisform.txtDKStd.value))
	{
		document.thisform.txtDKStd.value = 0;
	}
	if ((document.thisform.txtDKWeb.value == "") || !isInteger(document.thisform.txtDKWeb.value))
	{
		document.thisform.txtDKWeb.value = 0;
	}
	if ((document.thisform.txtDKEnt.value == "") || !isInteger(document.thisform.txtDKEnt.value))
	{
		document.thisform.txtDKEnt.value = 0;
	}
	if ((document.thisform.txtSKPush.value == "") ||!isInteger(document.thisform.txtSKPush.value))
	{
		document.thisform.txtSKPush.value = 0;
	}
	if ((document.thisform.txtSKInv.value == "") || !isInteger(document.thisform.txtSKInv.value))
	{
		document.thisform.txtSKInv.value = 0;
	}	
	if ((document.thisform.txtSKSuite.value == "") || !isInteger(document.thisform.txtSKSuite.value))
	{
		document.thisform.txtSKSuite.value = 0;
	}
	if ((document.thisform.txtUDPro.value == "") || !isInteger(document.thisform.txtUDPro.value))
	{
		document.thisform.txtUDPro.value = 0;
	}
	if ((document.thisform.txtUDServer.value == "") ||!isInteger(document.thisform.txtUDServer.value))
	{
		document.thisform.txtUDServer.value = 0;
	}
	
	document.thisform.submit();
}

function setUDPro()
{
	document.thisform.ProEdition.value='Professional'; 
	document.thisform.submit();
}

function setUDSvr()
{
	document.thisform.SvrEdition.value='Server'; 
	document.thisform.submit();
}

function setPro()
{
	document.thisform.ProEdition.value='Professional'; 
	document.thisform.submit();
}

function unsetPro()
{
	document.thisform.ProEdition.value='';
	document.thisform.submit();
}

function setSvr()
{
	document.thisform.SvrEdition.value='Server'; 
	document.thisform.submit();
}

function unsetSvr()
{
	document.thisform.SvrEdition.value='';
	document.thisform.submit();
}

function setAdmin()
{
	document.thisform.AdminEdition.value='Admin'; 
	document.thisform.action = "Diskeeper.aspx#admin";
	document.thisform.submit();
}

function unsetAdmin()
{
	document.thisform.AdminEdition.value='';
	document.thisform.submit();
}


function checkandsendmail(str, formtype)
{
    	
	if (formtype == "check")
	{
		if (document.Form.txtName.value == "")
		{
			alert("Please enter your name here");
			document.Support.txtName.focus();
		}
		else if(document.getElementByName("txtEmail").value == "")
		{
			alert("Please enter your email address here");
			document.Support.txtEmail.focus();
		}
		else if(document.getElementByName("txtOrder").value == "")
		{
			alert("Please enter your order number here");
			document.Support.txtOrder.focus();
		}
		else if(document.getElementByName("txtPhone").value == "")
		{
			alert("Please enter your phone number here");
			document.Support.txtPhone.focus();
		}
		else
		{
		    document.forms[0].mailcheck.value = "yes";
			document.forms[0].submit();
		}
	}
	else if (formtype == "checklink")
	{
		if (document.getElementByName("txtName").value == "")
		{
			alert("Please enter your name here");
			document.Support.txtName.focus();
		}
		else if(document.getElementByName("txtEmail").value == "")
		{
			alert("Please enter your email address here");
			document.Support.txtEmail.focus();
		}
		else if(document.getElementByName("txtPhone").value == "")
		{
			alert("Please enter your phone number here");
			document.Support.txtPhone.focus();
		}
		else
		{
		    document.forms[0].mailcheck.value = "yes";
			document.forms[0].submit();
		}
	}
	
	else
	{
	    
		if (document.forms[0].txtName.value == "")
		{
			alert("Please enter your name here");
			document.Support.txtName.focus();
		}
		else if(document.forms[0].txtEmail.value == "")
		{
			alert("Please enter your email address here");
			document.Support.txtEmail.focus();
		}
		else if(emailcheck(document.forms[0].txtEmail.value) == false)
		{
		    document.forms[0].txtEmail.value = "";
		    document.Support.txtEmail.focus();
		}
		else if(document.forms[0].txtPhone.value == "")
		{
			alert("Please enter your phone number here");
			document.Support.txtPhone.focus();
		}
		else if(document.forms[0].txtReason.value == "")
		{
			alert("Please enter the reason you are returning the product");
			document.Support.txtReason.focus();
		}
		else if(document.forms[0].txtOrder.value == "")
		{
			alert("Please enter your order number here");
			document.Support.txtOrder.focus();
		}
		else
		{	
		document.forms[0].ctl00$ctl00$body$pages$mailcheck.value = "yes";
		document.forms[0].submit();
		
//			document.Support.submit(); 
		}
	}
	 
}

function submitPage()
{
	if(document.Support.txtCC.value == "")
	{
		alert("Please enter the last 4 digitis of your credit card number here");
		document.Support.txtCC.focus();
	}
	else if(document.Support.txtOrder.value == "")
	{
		alert("Please enter your order number here");
		document.Support.txtOrder.focus();
	}
	else
	{	
		document.Support.action="/store/displaylink.aspx";
		document.Support.submit(); 
	}

}

function setUser()
{
		if (document.userForm.lstUser.options[document.userForm.lstUser.selectedIndex].value == "Corporate")
		{
			document.location = "http://www.executive.com";
		}
		else if (document.userForm.lstUser.options[document.userForm.lstUser.selectedIndex].value == "Government")
		{
			document.location = "http://www.execsoft.com/coverpage.asp";
		}
		else if (document.userForm.lstUser.options[document.userForm.lstUser.selectedIndex].value == "Small business")
		{
			document.location = "/smallbiz";
		}
		else if (document.userForm.lstUser.options[document.userForm.lstUser.selectedIndex].value == "Home")
		{
			document.location = "http://consumer.execsoft.com";
		}
}

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

function email()
{
  var locn =document.location+'';
  var openPage;
  
  lgth = locn.indexOf('?');
  if(lgth != -1)
  {
     locn = locn.substring(0,lgth);
  }
  openPage= "http://consumer.execsoft.com/tellafriend/emailpage.asp?pagebrw="+locn;
  
  
  window.open(openPage,"TellAFriend","toolbar=no,location=no, directories=no,status=no,menubar=no,scrollbars=no,width=428,height=460");
}

function stripInitialWhitespace (s)
{
	var whitespace = " \t\n\r"
	var i = 0;
	while ((i < s.length) && (whitespace.indexOf(s.charAt(i)) != -1))
		i++;  
	return s.substring (i, s.length);
}

function ValidateM()
{
	if (stripInitialWhitespace(document.search.SearchString2.value) == "") 
	{
		alert("Please enter the string you wish to search for.");
	 	document.search.SearchString2.focus();
	 	return false;
	}
				
	document.search.action="http://www.execsoft.com/tech-support/knowledgebase/sitesearchresults.aspx";
	document.search.goSearch.value="True";
	document.search.submit();	
			  	
}

		
function SubMe()
{
	if (window.event.keyCode ==13)
		ValidateM();
}

function clearAllDK()
{
	document.Diskeeper.DkUserControl1_txtDKPro.value="0";
	document.Diskeeper.submit();	
}

function emailcheck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Please enter a valid email address")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please enter a valid email address")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please enter a valid email address")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please enter a valid email address")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please enter a valid email address")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please enter a valid email address")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please enter a valid email address")
		    return false
		 }

 		 return true					
	}