function openutube(){
	window.open('http://www.youtube.com/watch?v=nDzoAEeGX8o','_blank');
	}
//JS FILE FOR THE CART
sethref = "http://www.ezeob.com/";
//sethref = "";
setcarthref = "https://www.ezeob.com/";//FOR callcart function

//BEGIN EMAIL CHECK TO DOWNLOAD
// changed call in include/menu_array.js
function downloadAccount() {
	window.open(sethref + 'downloadchk.cfm','callup','scrollbars=no,toolbar=no,status=no,location=0,resizable=no,close=yes,menubar=no,width=550,height=270');
}
//END EMAIL CHECK TO DOWNLOAD

//BEGIN LOGIN TO DOWNLOAD
function callDownload() {
	window.open(sethref + 'downloadfile.cfm','_parent');
}
//END LOGIN TO DOWNLOAD

//BEGIN CALL ADVANTAGE UPDATE PAGE
function callAdvantage() {
	window.open(sethref + 'advantageupdate.html','callup','scrollbars=no,toolbar=no,status=no,location=0,resizable=no,close=yes,menubar=no,width=600,height=450');
}
//END CALL ADVANTAGE UPDATE PAGE

// BEGIN FLASH CALL TO JAVASCRIPT FUNCTION
	var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
	// Handle all the the FSCommand messages in a Flash movie
	function ezdownload7_DoFSCommand(command, args) {
	  var ezdownload7Obj = InternetExplorer ? ezdownload7 : document.ezdownload7;
	  //
	  // Place your code here...
	  if(command == "status") {
		  callDownload();
		  //alert("hey Arnold!");
	  }	  
	}
	// Hook for Internet Explorer 
	if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
		  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('Sub ezdownload7_FSCommand(ByVal command, ByVal args)\n');
		document.write('  call ezdownload7_DoFSCommand(command, args)\n');
		document.write('end sub\n');
		document.write('</SCRIPT\> \n');
	}
// END FLASH CALL TO JAVASCRIPT FUNCTION

// BEGIN COUNTDOWN FUNCTION
	//change your event date event here.
	var eventdated = "APRIL 1, 2005";
	
	var eventdate = new Date("April 1, 2005 05:00 GMT");
	
	 function toSt(n)
	 {s=""
	  if(n<10) s+="0"
	  return s+n.toString();
	 }
	 
	 function countdown()
	 {cl=document.clock;
	  d=new Date();
	  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
	  if(count<=0)
	    {cl.days.value ="----";
	     cl.hours.value="--";
	     cl.mins.value="--";
	     cl.secs.value="--";
	     return;
	    }
	  cl.secs.value=toSt(count%60);
	  count=Math.floor(count/60);
	  cl.mins.value=toSt(count%60);
	  count=Math.floor(count/60);
	  cl.hours.value=toSt(count%24);
	  count=Math.floor(count/24);
	  cl.days.value=count;    
	  
	  setTimeout("countdown()",500);
	 }
// END COUNTDOWN FUNCTION

//BEGIN EMAIL CHECK TO TECH SUPPPORT LOGIN
function callSupport() {
	window.open(sethref + 'supportchk.cfm','callup','scrollbars=no,toolbar=no,status=no,location=0,resizable=no,close=yes,menubar=no,width=550,height=270');
}
//END EMAIL CHECK TO TECH SUPPORT LOGIN

//BEGIN EMAIL CHECK TO REG KEY/LICENSE GENERATOR LOGIN
function callRegKey() {
	window.open(sethref + 'accountchk.cfm','callup','scrollbars=no,toolbar=no,status=no,location=0,resizable=no,close=yes,menubar=no,width=550,height=270');
}
//END EMAIL CHECK TO REG KEY/LICENSE GENERATOR LOGIN


// BEGIN USER LOGIN VALIDATION
function sendfrm_login() {
	var form = document.getElementById("frm_login");
	if (document.getElementById("Login_Uname").value == ""){
		alert ("Please enter your username.");
		document.getElementById("Login_Uname").focus();
		return false;
	}
	else if (document.getElementById("Login_Pwd").value == ""){
		alert ("Please enter your password.");
		document.getElementById("Login_Pwd").focus();
		return false;
	}
	else {
		form.submit();
		return true;
	}
}
// END USER LOGIN VALIDATION

// BEGIN PASSWORD EMAIL VALIDATION
function sendfrm_emailpass() {
	var form = document.getElementById("frm_emailpass");
	if (document.getElementById("Ruser_email").value == ""){
		alert ("Please enter a valid email address.");
		document.getElementById("Ruser_email").focus();
		return false;
	}
	else {
		form.submit();
		return true;
	}
}
// END PASSWORD EMAIL VALIDATION


// BEGIN UPDATE CUSTOMER INFORMATION VALIDATION
function sendfrm_updcust() {
	var form = document.getElementById("frm_updcustomer");
	var thepwd = "";
	var thepwd = document.getElementById("C_password").value;
	var lenpwd = thepwd.length;
	if (document.getElementById("C_fname").value == ""){
		alert ("Please enter your first name.");
		document.getElementById("C_fname").focus();
		return false;
	}
	else if (document.getElementById("C_lname").value == ""){
		alert ("Please enter your last name.");
		document.getElementById("C_lname").focus();
		return false;
	}
	else if (document.getElementById("C_addr").value == ""){
		alert ("Please enter your street address.");
		document.getElementById("C_addr").focus();
		return false;
	}
	else if (document.getElementById("C_city").value == ""){
		alert ("Please enter your city address.");
		document.getElementById("C_city").focus();
		return false;
	}
	else if (document.getElementById("C_state").value == ""){
		alert ("Please select your state address.");
		document.getElementById("C_state").focus();
		return false;
	}
	else if (document.getElementById("C_zip").value == ""){
		alert ("Please select your zip code.");
		document.getElementById("C_zip").focus();
		return false;
	}
	else if (document.getElementById("C_email").value == ""){
		alert ("Please enter your valid email address. This will also be your login email.");
		document.getElementById("C_email").focus();
		return false;
	}
	 
	else if (lenpwd < 4){
		alert ("Please enter a password with at least 4 characters.");
		document.getElementById("C_password").focus();
		return false;
	}
	else {
		form.submit();
		return true;
	}
}
// END CUSTOMER INFORMATION VALIDATION


// BEGIN MAILING LIST OPTION
function callMailingList(e) {
	window.open(sethref + 'mailinglistopt.cfm?eid='+ e,'callup','scrollbars=no,toolbar=no,status=no,location=0,resizable=no,close=yes,menubar=no,width=550,height=465');
}
// END MAILING LIST OPTION

// BEGIN CALLCART
function callcart(){
	var L1, L2, L3, L4, L5 = "";
	L1 = "<a href=" + setcarthref + "cgi-bin/cart32.exe/EZEOB-ItemList>";
	L2 = L1 + "<img src=" + sethref + "images/carticon.jpg border=0 align=absmiddle>";
	L3 = L2 + "</a>&nbsp;&nbsp;";
	L4 = L3 + "<a href=" + setcarthref + "cgi-bin/cart32.exe/EZEOB-ItemList>";
	L5 = L4 + "<iframe width=120 height=30 src=" + setcarthref + "cgi-bin/cart32.exe/EZEOB-cartsummary frameborder=0 class=EZviewClass></iframe></a>";
	document.write(L5);
}
// END CALLCART

// BEGIN CONTACT US
function contactus(){
	var L1, L2, L3, L4, L5 = "";
	L1 = "<tr><td align=center class=EZcontact>";
	L2 = L1 + "EZEOB,&nbsp;LLC.<br>";
	L3 = L2 + "Voice:&nbsp;732-605-9279&nbsp;&nbsp;&nbsp;Fax:&nbsp;732-605-1090<br>";
	L4 = L3 + "Email:&nbsp;<a href=mailto:info@ezeob.com>info@ezeob.com</a>";
	L5 = L4 + "<br><br></td></tr>";
	document.write(L5);
}
// END CONTACT US

// BEGIN FOOTER LINKS
function footmenu(){
	var L1, L2, L3, L4, L5 = "";
	L1 = "<tr><td align=center class=EZfoot>";
	L2 = L1 + "|&nbsp;<a href=" + sethref + "privacyinfo.cfm target=_self>Privacy&nbsp;Information</a>&nbsp;|&nbsp;";
	//L3 = L2 + "<a href=JavaScript:callDownload();>Download&nbsp;Free&nbsp;Trial</a>&nbsp;|";
	L3 = L2 + "<a href=" + sethref + "returnpolicy.cfm target=_self>Return&nbsp;Policy</a>&nbsp;|";
	L4 = L3 + "<br><br></td></tr>";
	document.write(L4);
}
// END FOOTER LINKS

// BEGIN SHORE SOFTWARE TAGLINE
function shoretag(){
	var L1, L2, L3, L4 = "";
	L1 = "<tr><td align=right><font size=-2 face=Arial color=Blue>";
	L2 = L1 + "<blockquote><span class=ShoreTag>Designed&nbsp;&amp;&nbsp;maintained&nbsp;by&nbsp;";
	L3 = L2 + "<a href=http://www.shoresoftware.com target=_blank><span class=ShoreLink>Shore&nbsp;Software,&nbsp;Inc.</span></a>";
	L4 = L3 + "</span></blockquote></font></td></tr>";
	document.write(L4);
}
// END SHORE SOFTWARE TAGLINE

// BEGIN COPYRIGHT IN ALL PAGES
function copyright(){
	var L1 = "";
	L1 = "Copyright&copy; 2006 EZ EOB, LLC. All rights reserved.";
	document.write(L1);
}
// END COPYRIGHT IN ALL PAGES

// BEGIN IMAGE SCRIPT
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) { //v3.0
  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); 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];}
}
// END IMAGE SCRIPT

// BEGIN CHECK FOR ACROBAT READER
//This script detects the following plugin:
		//Flash
		//Windows Media Player
		//Java
		//Shockwave
		//RealPlayer
		//QuickTime
		//Acrobat Reader
		//SVG Viewer
function chkacro(pdf){
	if (pluginlist.indexOf("Acrobat Reader")!=-1) 
		{
			window.open("pdfs/" + pdf,"_blank", 'width=600,height=400,resizable=1,scrollbars=1');
		}
	else
		{
			alert("You need to download and install Acrobat Reader to view this form.\nIf the download does not automatically begin, please visit www.acrobat.com");
			window.open("http://ardownload.adobe.com/pub/adobe/reader/win/6.x/6.0/enu/AdbeRdr60_enu.exe","_blank");
		}
}
// END CHECK FOR ACROBAT READER


// BEGIN SHOWHIDE
function showElement(td,el){
	//alert(td + el);
	var thisTD = td;
	var box = getElem(el);
	if(box.style.display == "none"){
		box.style.display = "";
	} else {
		box.style.display = "none";
	}
	if(thisTD.className == "clickable_id"){
		thisTD.className = "clickable_id_selected";
	} else {
		thisTD.className = "clickable_id";
	}
}
function getElem(el){
	//return document.all ? document.all[el] : document.getElementById(el);
	return document.getElementById(el);
}
// END SHOWHIDE


// BEGIN REGKEY FORM VALIDATION
function sendfrm_keygen(){
	//Check Reg ID fields and check for numeric values and confirm.
	if (document.getElementById("RKfield1").value == ""){
		alert ("Please enter the Registration ID to generate keys.");
		document.getElementById("RKfield1").focus();
		return false;
	}
	else if (chkNumeric(document.getElementById("RKfield1").value) == false){
		alert("Please enter only numbers in the Registration ID fields");
		document.getElementById("RKfield1").focus();
		return false;
	}
	else if (document.getElementById("RKfield2").value == ""){
		alert ("Please enter the Registration ID to generate keys.");
		document.getElementById("RKfield2").focus();
		return false;
	}
	else if (chkNumeric(document.getElementById("RKfield2").value) == false){
		alert("Please enter only numbers in the Registration ID fields");
		document.getElementById("RKfield2").focus();
		return false;
	}
	else if (document.getElementById("RKfield3").value == ""){
		alert ("Please enter the Registration ID to generate keys.");
		document.getElementById("RKfield3").focus();
		return false;
	}
	else if (chkNumeric(document.getElementById("RKfield3").value) == false){
		alert("Please enter only numbers in the Registration ID fields");
		document.getElementById("RKfield3").focus();
		return false;
	}
	else if (document.getElementById("RKfield4").value == ""){
		alert ("Please enter the Registration ID to generate keys.");
		document.getElementById("RKfield4").focus();
		return false;
	}
	else if (chkNumeric(document.getElementById("RKfield4").value) == false){
		alert("Please enter only numbers in the Registration ID fields");
		document.getElementById("RKfield4").focus();
		return false;
	}
	else {
		RegKeyID = document.getElementById("RKfield1").value + "-" + document.getElementById("RKfield2").value + "-" + document.getElementById("RKfield3").value + "-" + document.getElementById("RKfield4").value;
		msg = "Generate registration key for:  " + RegKeyID + "? Is this correct?";
		if (confirm(msg)){
			return true;
		}
		else {return false;}
	}
}
// END REGKEY FORM VALIDATION


function chkNumeric(strString)
  	//Check for valid numeric strings	
{
var strValidChars = "0123456789.-";
var strChar;
var blnResult = true;
if (strString.length == 0) return false;
//  test strString consists of valid characters listed above
for (i = 0; i < strString.length && blnResult == true; i++)
	{
	strChar = strString.charAt(i);
	if (strValidChars.indexOf(strChar) == -1)
		{
    		blnResult = false;
    	}
	}
   return blnResult;
}


// BEGIN CHANGE START DATE VIEW

// END CHANGE START DATE VIEW


// BEGIN FUNCTION FOR SALES DETAIL SEARCH BY DATES FORM VALIDATION
function sendfrm_detail() {
	var form=document.getElementById('frm_detail');
	if (document.getElementById("S_sdate").value == ""){
		alert ("From what Start Date?");
		document.getElementById("S_sdate").focus();
		return false;
	}
	else if (document.getElementById("S_edate").value == ""){
		alert ("To what End Date?");
		document.getElementById("S_edate").focus();
		return false;
	}
	//form.submit();
	return true;
}
// END FUNCTION FOR SALES DETAIL SEARCH BY DATES FORM VALIDATION


// BEGIN UPDATE VENDOR INFORMATION VALIDATION
function send_vinfo() {
	var form = document.getElementById("frm_vendinfo");
	if (document.getElementById("vi_fname").value == ""){
		alert ("Please enter your first name.");
		document.getElementById("vi_fname").focus();
		return false;
	}
	else if (document.getElementById("vi_lname").value == ""){
		alert ("Please enter your last name.");
		document.getElementById("vi_lname").focus();
		return false;
	}
	else if (document.getElementById("vi_addr1").value == ""){
		alert ("Please enter your street address.");
		document.getElementById("vi_addr1").focus();
		return false;
	}
	else if (document.getElementById("vi_city").value == ""){
		alert ("Please enter your city.");
		document.getElementById("vi_city").focus();
		return false;
	}
	else if (document.getElementById("vi_zip").value == ""){
		alert ("Please enter your zip code.");
		document.getElementById("vi_zip").focus();
		return false;
	}
	else if (document.getElementById("vi_phone").value == ""){
		alert ("Please enter your phone number.");
		document.getElementById("vi_phone").focus();
		return false;
	}
	else if (document.getElementById("vi_email").value == ""){
		alert ("Please enter your valid email address.");
		document.getElementById("vi_email").focus();
		return false;
	}
	return true;
}
// END UPDATE VENDOR INFORMATION VALIDATION