// EzWeb247 JavaScript Header Ajax + PIX + SetUp - Revised 10-28-2010 jbw
// Global Variables and Function Names are U/L Case, Temp Variables and Parameters are Generally ALL CAPS &/or Digits
if(EzBug==undefined||isNaN(EzBug))var EzBug=0;		// Default Debug Flag to Off (0)
if(EzA==undefined)var EzA="EzWeb247";			// Default Affiliate ID
if(EzB==undefined)var EzB="netclx";			// Default ClickBank ID
if(EzC==undefined)var EzC="";				// Contact Phone Overide
if(EzD==undefined)var EzD="";				// tbd
if(EzE==undefined)var EzE="";				// Default eBay ID
if(EzF==undefined)var EzF="";				// tbd
if(EzG==undefined||EzG=="")var EzG="EzClx.us";		// Shortener URL w TLD (Query Overide)
if(EzH==undefined||EzH=="")var EzH=unescape(location.hostname);	// Host Domain/ID (Query Overide)
if(EzI==undefined)var EzI="";				// tbd
if(EzJ==undefined)var EzJ="";				// tbd
var EzK=unescape(location.search).substring(1);		// URL Query String w/o ?
if(EzL==undefined)var EzL="";				// URL to Launch onLoad (Query Overide)
var EzM="The Host in Web Hosting";			// Site or Page Motto
if(EzN==undefined||isNaN(EzN)||EzN>99)var EzN=9;	// Limit of Query Terms to Parse
if(EzO==undefined||isNaN(EzO))var EzO=1;		// Window Open OK Flag
var EzP="903"+"-224"+"-5525";				// Contact Phone Number (Query Overide)
var EzQ=EzK.split("&");EzN=EzQ.length;			// Query Terms Array + EzN=Actual #
if(EzR==undefined)var EzR="";				// tbd
if(EzS==undefined)var EzS="";				// Site Name Overide
if(EzT==undefined||isNaN(EzT))var EzT=0;		// Last SetTimeout Number
if(EzU==undefined||EzU=="")var EzU=EzG+"/EzGVO";	// URL to Launch onUnLoad (Query Overide)
var EzV=new Array();					// Query Values Array
if(EzW==undefined)var EzW="";				// Saves www. if any from URL
var EzX=".com",X=0,Y=0,Z="";				// Host Extension (Query Overide) + Misc
if(EzY==undefined||isNaN(EzY)||EzY<0)var EzY=0;		// onExit Target URL Run Count
if(EzZ==undefined)var EzZ="";				// tbd
if(WNUA==undefined)var WNUA=window.navigator.userAgent;	// Browser ID
if(EzWidth==undefined||isNaN(EzWidth))var EzWidth=780;	// Window Width (780)
if(EzHeight==undefined||isNaN(EzHeight))var EzHeight=screen.availHeight;// Window Height
var EzKey=new Array, EzDat=new Array;			// Macro Search and Replace Arrays
self.status='Powered by EzWeb247.com (c) 1999 - 2011';	// Display CopyRight in Status Bar
// *** 035
EzH=EzH.toLowerCase();					// U/L Update Known Host Names
var EZZ=EzH.indexOf("doubleclick");
if(EZZ>-1)
{EzH=EzH.substring(EZZ+11);				// Drop DoubleClick from EzH
 if(EzH.indexOf("hq"))		EzH="HQ";
 if(EzH.indexOf("mail"))	EzH="Mail";
 if(EzH.indexOf("news"))	EzH="News";
 if(EzH.indexOf("books"))	EzH="Books";
 if(EzH.indexOf("photo"))	EzH="Photo";
 if(EzH.indexOf("sales"))	EzH="Sales";
 if(EzH.indexOf("solar"))	EzH="Solar";
 if(EzH.indexOf("video"))	EzH="Video";
 if(EzH.indexOf("hosting"))	EzH="Hosting";
 if(EzH.indexOf("profits"))	EzH="Profits";
 if(EzH.indexOf("shopper"))	EzH="Shopper";
 EzH="DoubleClick"+EzH;EzX=".com";}
else
{if(EzH.indexOf("ftp")>-1)			EzH="EzWebFTP";
 if(EzH.indexOf("pdf")>-1)			EzH="EzWebPDF";
 if(EzH.indexOf("clx2")>-1)		       {EzH="Clx2";EzX=".Us";}
 if(EzH.indexOf("clx4")>-1)		       {EzH="Clx4";EzX=".Us";}
 if(EzH.indexOf("clxr")>-1)		       {EzH="ClxR";EzX=".Us";}
 if(EzH.indexOf("ezclx")>-1)		       {EzH="EzClx";EzX=".Us";}
 if(EzH.indexOf("ezgvo")>-1)			EzH="EzGVO";
 if(EzH.indexOf("1stbuz")>-1)			EzH="1stBuz";
 if(EzH.indexOf("clxrus")>-1)		       {EzH="ClxRUs";EzX=".com";}
 if(EzH.indexOf("netmlm")>-1)			EzH="NetMLM";
 if(EzH.indexOf("ezgogvo")>-1)			EzH="EzGoGVO";
 if(EzH.indexOf("itsafaq")>-1)			EzH="ItsaFAQ";
 if(EzH.indexOf("debadams")>-1)			EzH="DebAdams";
 if(EzH.indexOf("ezweb247")>-1)			EzH="EzWeb247";
 if(EzH.indexOf("ezwebhtml")>-1)		EzH="EzWebHTML";
 if(EzH.indexOf("faunafund")>-1)		EzH="FaunaFund";
 if(EzH.indexOf("mobologos")>-1)		EzH="MoboLogos";
 if(EzH.indexOf("myfreepdf")>-1)		EzH="MyFreePDF";
 if(EzH.indexOf("omegamail")>-1)		EzH="OmegaMail";
 if(EzH.indexOf("altshopper")>-1)		EzH="ALTshopper";
 if(EzH.indexOf("biztoolshq")>-1) 		EzH="BizToolsHQ";
 if(EzH.indexOf("elfcookery")>-1)		EzH="ElfCookery";
 if(EzH.indexOf("myfreehtml")>-1)		EzH="MyFreeHTML";
 if(EzH.indexOf("rarevalues")>-1)		EzH="RareValues";
 if(EzH.indexOf("merrymarket")>-1) 	       {EzH="MerryMarket";EzX=".net";}
 if(EzH.indexOf("shopasaurus")>-1) 		EzH="ShopaSarurs";
 if(EzH.indexOf("arklatexnews")>-1)		EzH="ArkLaTexNews";
 if(EzH.indexOf("greatbuys247")>-1) 		EzH="GreatBuys247";
 if(EzH.indexOf("jerrywindham")>-1)		EzH="JerryWindham";
 if(EzH.indexOf("merry-market")>-1) 		EzH="Merry-Market";
 if(EzH.indexOf("starchannels")>-1)		EzH="StarChannels";}
 self.status=EzH+" - "+self.status;
if(!EzH)EzH="EzWeb247";
// *** 086
function EzRand(RLO,RHI) // Return a Randomly Selected Integer Between RLO (Min=1) and RHI
{if(RLO==undefined||isNaN(RLO)||RLO<0)RLO=1;		// Limit Min Return to 1
 if(RHI==undefined||isNaN(RHI)||RHI<2)RHI=10;		// Default MAX Return to 10
 do{var RND=Math.ceil(Math.random()*RHI);}while(RND<RLO);
 if(RLO==0){RND--;}if(EzBug)alert("EzRand("+RLO+","+RHI+"): "+RND);return RND;}
// *** 092
// EzFixURL() Adds Missing "http://" and/or Expanded URL and/or ".com" If needed - Rev 10-25-10
// If EZU = /ShortCode1/ShortCode2/ShortCode3/... then Randomly select one to process - Still Need IP Address check logic.
function EzFixURL(EZU)					// Expands an Ez ShortHand URL and Returns the Result
{if(EZU==undefined||EZU=="")EZU=EzU;			// Default Redirect URL
 if(EZU==undefined||EZU=="")EZU=EzG;			// Secondary Default Redirect Shortener Service
 if(EZU==undefined||EZU==""||EZU.length<2)return ""; 	// URL Missing, Consider Prompting for a URL
 var EZT=0,EZP="",EZQ="",EZZ=EZU.indexOf(":")+1;	// Test for URL Protocol
 if(EZZ>7)EZZ=0;if(EZZ>0)EZP=EZU.substring(0,EZZ);	// Save URL Protocol
 EZZ=EZU.indexOf("/?");if(EZZ<0)EZZ=EZU.indexOf("?");	// Test for ? or /? Query String
 if(EZZ>-1){EZQ=EZU.substring(EZZ);EZU=EZU.substring(0,EZZ);} // Save Query String
 if(EZU.indexOf("/")==0&&EZU.indexOf(".")<0)		// Check for Short/Cloaked URL Code(s)
 {var Z=EZU.substring(1).split("/");if(Z.length>1){EZU="/"+Z[EzRand(0,Z.length)];}EZU=EzG+EZU;}	// Random Short Code					
 var EZA=new Array('biz','ca','cc','co','com','cn','edu','eu','gb','gov','hk','info','jp','jobs','mil','mobi','name','net','org','ph','pr','pro','ru','su','tel','travel','uk','us','vi');
 EZZ=0;while(EZZ<EZA.length&&EZT<1){if(EZU.toLowerCase().indexOf('.'+EZA[EZZ])>-1)EZT=1;EZZ++;}
 var EZX=0,EZA=new Array('doc','htm','mp','mov','php','shtm','swf','txt','xls','zip');
 EZZ=0;while(EZZ<EZA.length&&EZX<1){if(EZU.toLowerCase().indexOf('.'+EZA[EZZ])>-1)EZX=1;EZZ++;}
 var EZS=EZU.indexOf('/');if(EZS==EZU.indexOf('//'))EZS=EZU.indexOf('/',EZS+2); //Find 1st /
 if(EZT<1&&EZX<1)if(EZS<0){EZU=EZU+".com";}else{EZU=EZU.substring(0,EZS)+'.com'+EZU.substring(EZS)}// Add .com if No Type
 if(EZP.length<1&&(EZX<1||EZT>0))EZU="http://"+EZU;	// Add http:// Prefix if Needed
 return EZU+EZQ}
// *** 113
for(X=0;X<EzN;X++)	// Parse URL Query String Parameters into the EzQ[] and EzV[] Arrays
{EzV[X]=EzQ[X].substring(EzQ[X].indexOf("=")+1);
 EzQ[X]=EzQ[X].substring(0,EzQ[X].indexOf("="));}
// *** 117
// EzQuery() Returns the Value of Specifed Query Label
function EzQuery(EZQ)		// Displays All if EZQ = & or * (Need a Display Specified Parm)
{if(!EZQ){document.write(EzK);return "";}
 if(EZQ=="*"){Z="<br />";EZQ="&";}else{Z="|";}
 for(X=0;X<EzN;X++){if(EZQ==EzQ[X])return EzV[X];
     if(EZQ=="&")document.write(EzQ[X]+"="+EzV[X]+Z);}return "";}
// *** 124
if(EzQuery("EzG"))EzG=EzQuery("EzG");			// Check Shortener Service Overide
if(EzQuery("EzH"))EzH=EzQuery("EzH");			// Check Host Name Overide
if(EzS)EzH=EzS;						// Program Overide EzH Site Name
if(EzH.toLowerCase()=="ezweb247")EzH="EzWeb247";	// Clean Up EzWeb
if(EzQuery("EzP"))EzP=EzQuery("EzP");			// Check Phone Query Overide
if(EzC)EzP=EzC;						// Program Overide EzP Site Phone
// *** 131
if(EzH.indexOf(".com")>-1)EzH=EzH.substring(0,EzH.indexOf(".com"));
else{if(EzH.indexOf(".")>-1){EzX=EzH.substring(EzH.lastIndexOf("."));EzH=EzH.substring(0,EzH.lastIndexOf("."));}}
if(EzH.length<2){EzH="EzWeb247";EzX=".com";}
if(EzQuery("EzX"))EzX=EzQuery("EzX");			// Check for TLD Overide
if(EzH.indexOf("www.")==0||EzH.indexOf("ftp.")==0)EzH=EzH.substring(4); //Need to Set EzW="www." if Found
if(EzQuery("EzL"))EzL=EzFixURL(EzQuery("EzL"));		// Overide onLoad URL from Query
if(EzQuery("EzU"))EzU=EzFixURL(EzQuery("EzU"));		// Overide Unload URL from Query
// *** 139
// Setup EzShow Random Picture Rotator Parameters
var MIN=1,MAX=1,PAT="",PFX="",LEN=4,SFX="",TFX="",TYP=".jpg",NUM="0000",TMR=10000;
if(EzQuery("MIN"))MIN=EzQuery("MIN");if(EzQuery("MAX"))MAX=EzQuery("MAX");
if(EzQuery("PFX"))PFX=EzQuery("PFX");if(EzQuery("SFX"))SFX=EzQuery("SFX");
if(EzQuery("TYP"))TYP=EzQuery("TYP");if(EzQuery("LEN"))MAX=EzQuery("LEN");
if(EzQuery("PAT"))PAT=EzQuery("PAT");if(EzQuery("TMR"))TMR=EzQuery("TMR");
if(MIN<1) MIN=1;  if (MAX<1) MAX=1;  // Correct Invalid RND Num Range Limits
// *** 147
// SetUp PixFrame to 4 by 6 Large Thumb Mode
var PixMax=15,PixSN="23810067",RowMax=5,PixBas="Pix",PitBas="Pit",PitWid=144,PitTal=96
Z=EzQuery('RowMax');if(Z){RowMax=Z;}Z=EzQuery('PixMax');if(Z){PixMax=Z;}Z=EzQuery('PitWid');if(Z){PitWid=Z;}Z=EzQuery('PitTal');if(Z){PitTal=Z;}
// *** 151
// EzCenter() Centers the Current Window in the Current Screen
function EzCenter(EZW,EZH)
{self.moveTo(0,0);
 if(!EZW||EZW<10)EZW=EzWidth;if(!EZH||EZH<10)EZH=EzHeight;
 if(EZW<10||EZW>screen.availWidth) {EZW=screen.availWidth;EzWidth=EZW;}
 if(EZH<10||EZH>screen.availHeight){EZH=screen.availHeight;EzHeight=EZH;}
 self.resizeTo(EzWidth,EzHeight);
 self.moveTo(Math.round((screen.availWidth-EZW)/2),Math.round((screen.availHeight-EZH)/2));}
// *** 160
// EzMacro() Manages EzKey[] and EzDat[] Arrays for String Search and Replace Operations
// Returns Updated String or True/False depending on the Specified Action (EZA)
// EzMacro(EZK,"-") Deletes the EzKey[]/EzDat[] Pair Matching EZK Returns True or False(if No Match)
// EzMacro("","-",EZD)  Deletes the EzDat[]/EzKey[] Pair Matching EZD Returns True or False(if No Match)
// EzMacro(EZK,"~",EZD) Replaces ALL instances of EZK in EZD with the Matching EzDat[] Value Returns EZD
// EzMacro("","*",EZD)  Replaces ALL instances of EzKey[] Values in EZD with EzDat[] Returns Updated EZD
// *** 167 ***  // Below=Implemented Options - Above = Future Implementations
// EzMacro() Clears the EzKey[] Array and the EzDat[] Array
// EzMacro(EZK) Returns the EzDat[] Element for the Matching EzKey[] Entry     or False(if No Match)
// EzMacro(EZK,"=",EZD) Replaces or Adds EZK:EZD to the EzKey[]/EzDat Arrays True=Replace False=Add
// EzMacro(EZK,"+",EZD) Adds EZK:EZD to the EzKey[]/EzDat Arrays True if EZK PreExisted, False if Not
// EzMacro(EZK,EZA,EZD) Replaces ALL instances of EZK in EZD with EZA and Returns the Updated EZD (Recursive)
function EzMacro(EZK,EZA,EZD)
{var ekl=EZK.length,ekx=EzKey.length,ekp=EZD.indexOf(EZK);
 if(!EZK){EzKey=Null;EzDat=Null;return false;}
 if(!EZA){ekx=0;while(ekx<EzKey.length){if(EZK==EzKey[ekx])return EzDat[ekx];ekx++;}return false;}
 if(!EZK||EZK==""||EZD||EZD=="")return "";
 switch (EZA)
 {case "-":return false;break;
  case "+":EzKey[EzKey.length]=EZK;EzDat[EzDat.length]=EZD;return false;break;
  case "=":EzKey[EzKey.length]=EZK;EzDat[EzDat.length]=EZD;return false;break;
  case "~":return false;break;
  case "*":return false;break;}
 if(!EZK||EZK==""||!EZD||EZD=="")return "";
 while (ekp>-1)
 {EZD=EZD.substring(0,ekp)+EZA+EZD.substring(ekp+ekl);
  ekp=EZD.indexOf(EZK);}
  return EZD;}
// *** 189
// EzShow() Randomly Displays Images from a Specified Path.
// The Images must be sequentially numbered between MIN and MAX.
// PAT specifies the optional local Path or Internet URL
// PFX specifies the File Name Prefix, Before the number, if any.
// LEN specifies the number of digits in the image number.
// SFX specifies the File Name Suffix, After the number, if any.
// TFX specifies the Thumb File Suffix, After the number, if any.
// TYP specifies the Image File Type such as .JPG, .BMP, .GIF, etc.
// TMR specifies the number of seconds (times 1,000) to display each Image.
// The src="1stImage" clause in the Body specifies the 1st Image to display.
function EzShow(SLO,SHI) // Display a Randomly Selected PIX Between SLO and SHI
{NUM="0000000"+EzRand(SLO,SHI);NUM=NUM.substring(NUM.length-LEN);
 document.PIX.src=PAT+PFX+NUM+SFX+TYP; document.PIX.title=PFX+NUM+SFX;
 self.status=EzH+"  Displaying: "+PFX+NUM+SFX+TYP;}
// *** 204
// EzTrow() Displays a Row of Thumbnail Images
// TX1=1st#,TX2=Last#,tfx=PathPfx,sfx=sufx,typ=.jpg,TLN=#Len,THI=ThmHeight,TLT=AltTxt,TTL=Title,TMO=MouseOver,TOC=OnClick
function EzTrow(TX1,TX2,tfx,sfx,typ,TLN,THI,TLT,TTL,TMO,TOC)
{if(!tfx||tfx<"0")tfx=TFX;if(tfx<"0")tfx="";var tnx="";
 if(!sfx||sfx<"0")sfx=SFX;if(!sfx||sfx<"0")sfx="";if(!typ)typ=".jpg"
 if(!TX1||TX1<1)TX1=1;tnm=TX1;if(!TX2||TX2<(TX1+1))TX2=TX1+9;if(TX2>MAX)TX2=MAX;
 if(!THI||THI<10)THI=65;if(!typ)typ=TYP;if(!TLN||TLN<2)TLN=LEN;if(TLN<2)TLN=4;
 if(!TLT||TLT<"0")TLT="EzWebPhotos.com Information";if(!TTL||TTL<"0")TTL="Click for Photo Information";
 if(!TMO||TMO<"0")TMO="onmouseover='NUM="+'"|NUM|"'+';document.PIX.src=PAT+PFX+NUM+SFX+TYP;self.status=EzH+" Displaying: "+PFX+NUM+SFX;return false;'+"'"
 if(!TOC||TOC<"0")TOC="onclick='"+'window.open(PAT+PFX+SFX+"Info.htm?IMG="+PFX+NUM+SFX+"&amp;TYP="+TYP,"Gallery","menubar=false,toolbar=false,resizable=yes,scrollbars=yes");return false;'+"'"
 for(tnm=TX1;tnm<(TX2+1);tnm++){tnx="0000000"+tnm;tnx=tnx.substring((tnx.length-TLN));
  document.write('<td><img name="EzT'+tnx+'" alt="'+TLT+'" title="'+TTL+'" src="'+PAT+tfx+tnx+sfx+typ+'" height='+THI+' '+EzMacro("|NUM|",tnx,TMO)+' '+TOC+'></td>');}}
// *** 217
// EzLink() Creates Links with URL Query Term Pass Thru
function EzLink(DLH,DL1,DL2,DL3,DL4,DL5)
{var DLS="&",DLA=new Array(5);
 if(!DLH){DLH="";}DLA[0]=DLH;
 if(!DL1){DL1="";}DLA[1]=DL1;
 if(!DL2){DL2="";}DLA[2]=DL2;
 if(!DL3){DL3="";}DLA[3]=DL3;
 if(!DL4){DL4="";}DLA[4]=DL4;
 if(!DL5){DL5="";}DLA[5]=DL5;
 if(DLH.length>1){DLA[0]+="?";}if(DLH=="/"){DLS="/";DLH=EzH+EzX;}
 if(DLH==""&&DL1==""){document.write(EzK);}}
// *** 229
// EzMail() Protects eMail links from Scavenger Bots - Revised 08-27-2006 jbw
function EzMail(DMN,DML,DMS,DMD,DMT)
{var DMA='', DMC='', DMX=0 // Name,Link,Subject,Domain,Type
// DMD, DML, DMN, DMS Can be Supplied in URL Query - Special DMN Cases: HostName & ButtonLink
 if(!DMD||DMD=='')DMD=EzQuery("DMD");
 if(!DML||DML=='')DML=EzQuery("DML");
 if(!DMN||DMN=='')DMN=EzQuery("DMN");
 if(!DMS||DMS=='')DMS=EzQuery("DMS");
 if(DMN=='')DMN='Support';
 if(DMN=='ButtonLink'){DMX='B';DMN='Contact';}DMC=DMT;
 DMA='<a href=';DMA+='mailto:';DMA+=DMN;DMA+='@';
 if(!DMT||DMT==''||length.DMT>6||DMT=='EzP'){DMT='com';}
 if(DMD==''){DMA+=EzH+EzX;}else{DMA=DMA+DMD+'.'+DMT;}
 if(DMS==''){DMA+='>';}else{DMA=DMA+'?subject="'+DMS+'">';}DMA+='<b>';
 if(DMX=='B'){DMA+='<button style=font-size:11pt;color:black;background-color:"grey">';}
 if(DML==''){DMA+=DMN;}else{DMA+=DML;}
 if(DMX=='B'){DMA+='</button>';}DMA+='</b></a>';
 if(DMC=='EzP'&&EzQuery('EzP'))DMA+=' or call <b>'+EzQuery('EzP')+'</b>';
 document.write(DMA);}
// *** 249
// EzContact() MCS:0=Email;1=Anonomous MCT=LinkText MCD=Domain(Default=HOST) MCB:B=ButtonLInk
function EzContact(MCS,MCT,MCD,MCB)
{var MCA=''
 if(!MCD||MCD=='')MCD=EzH+EzX;
 if(!MCB||MCB!='B')MCB='';
 if(!MCT||MCT=='')MCT=EzQuery("MCT");
 if(!MCS||MCS==''||MCS<'0'||MCS>'1')MCS='0';
 if((!MCT||MCT=='')&MCS=='1')MCT='Feedback';
 if(!MCT||MCT=='')MCT='ContactUs';
 if(MCD.indexOf("www.")==0||MCD.indexOf("ftp.")==0)MCD=MCD.substring(4);
 if(MCD.indexOf("http://")==0)MCD=MCD.substring(7);
 if(MCD.indexOf(".")<0)MCD+=".com";
 MCA='<a rel="nofollow" title="Click to Contact '+EzH+'" href="javascript:displayWindow('+"'http://www."+MCD+"/CGI/MCS/','"+MCS+"');"+'">';
 if(MCB=='B'){MCA+='<button style="font-size:11pt;color:black;background-color:#cccccc">';}
 MCA+=MCT;if(MCB=='B'){MCA+='</button>';}MCA+='</a>';document.write(MCA);}
// *** 265
// EzGoNow() Expands an Ez ShortHand URL and Redirect to or Open the URL in a New Window
function EzGoNow(EZU,EZW,EZY)				// Expand ShortHand URL and Launch
{if(EZU==undefined)EZU="";				// Clear Missing URL
 EZU=EzFixURL(EZU);if(EZU=="")EZU=prompt("Enter URL");	// Quit if Still No URL to Launch
 if(EZW==undefined)EZW="";				// Set Missing Window Name to ""
 if(EZY==undefined||isNaN(EZY))EZY=1;			// Default Launched Counter Increment to 1
 if(EZY>0||EZU==EzU){EzY+=1;clearTimeout(EzT);EzT=0;}	// Count Launch and Clear Exit Timer
 if(EZW==""||EzO==0){self.location.href=EZU;}			// Test Redirect vs New Window PopUp
 else{window.open(EZU,EZW,'menubar=0,toolbar=0,location=0,resizable=1,scrollbars=1');}}
// *** 275
// EzGoSite() Redirects to Specified URL		// Function Replaced by EzGoNow()
function EzGoSite(EZU){if(EZU==undefined){EZU="";}EzGoNow(EZU);}
// *** 278
// EzGoTime() sets up a Delayed Re-Load or Window Open (PopUp) of a Specified or Default URL
// Note: If Opening a New Window, Caller should include "return false"
// The Target URL will be prefixed with "http://" and/or appended with ".com" if needed
// If Target URL Begins with a / it Will Be PreFixed with the Specified URL Shortening Service URL (EzG)
// - That is, Target URL will be treated as a Short URL Code to be Launched by a URL Shortening Service.
// The Function can be invoked directly inside a script or with an onAction="..." Associated with any Event
//  EZU  = Target URL Parameter;
//  EZT  = Delay Parameter (< 100 = Seconds, > = Milli-Seconds); 
//  EZW  = New Window Name ("" = Open in Current Window - "*" = Clear Timer Only); 
//  EzU  = Global Default Target URL; 
//  EzG  = Global URL Shortening Service URL w/o Ending /;
function EzGoTime(EZU,EZW,EZT) // EzGoTime(Target-URL/ShortURL,Optional New Window Flag,Optional Delay)
{if(EZW==undefined)EZW="";				// Default Open in Current Window
 if(EZW=="*"){if(EZT!=undefined){clearTimeout(EZT);}return;} // Stop Timer and Return
 if(EZT==undefined||isNaN(EZT))EZT=0;			// Default Redirect Delay
 clearTimeout(EzT);EzT=0;				// Clear Previous Launch Timer
 if(EZW=="")						// Test for New Window Name
     {document.title="Loading: "+EZU;}			// Set Redirect/Loading Message
 else{document.title="Opening: "+EZU;}			// Set Redirect/PopUp Message
 self.status=document.title;			// Display Redirect/Open Message in Title and Status
 if(EZT<1){EzGoNow(EZU,EZW,0);return true;}		// No Timer Needed if Delay is Less Than 1
 EZU="EzGoNow('"+EZU+"','"+EZW+"');";			// Set Up EzGoNow Command to be Launched at TimeOut
 if(EZT<100)EZT*=1000;					// Adjust Delay to Mili-Seconds
 EzT=setTimeout(EZU,EZT);}				// Save Delay Timer Number for Load/Open Target
// *** 303
<!-- EzDirect() Delayed Web URL Redirect in Sec or Milliseconds (If <0 display message) -->
function EzDirect(EZD,EZT)				// Functionality Replaced by EzGoTime()
{if(EZD!=undefined&&EzQuery("EZD"))EZD=EzQuery("EZD");	// Test for URL Overide from Query
 if(EZD==undefined||!EZD||!isNaN(EZD)||EZD.length<4)EZD="EzWeb247";
 if(EZT!=undefined&&EzQuery("EZT"))EZT=EzQuery("EZT"); 	// Test for Time Overide from Query
 if(isNaN(EZT))EZT=30;if(EZT>999)EZT=EZT/1000;		// Check/Adjust Time for Defaults
 if(EZT<0){EZT=0-EZT;document.write("Redirecting to: "+EZD+" in "+EZT+" Seconds");}
 EzGoTime(EZD,"",EZT);}					// Pass Adjusted Parameters to EzGoTime()
// *** 312
// EzGoShort() Feeds a URL Short Code to a Specified Short to Long URL Expander Lanucher Service
function EzGoShort(UID,BID)				// (ShortURLCode,ButtonID)
{if(UID==undefined||UID=="")UID="EzClxURL";		// Default Short URL Input ID
 var EZU=document.getElementById(UID).value;		// Save Short URL Code
 if(EZU==undefined||EZU==null||EZU==""){alert("Please enter an EzClx Short URL Code.");return;}
 if(EZU.indexOf(".")!=0)EZU="/"+EZU;			// Prefix Short URL(s) with a "/"
 if(BID)document.getElementById(BID).value="Opening: http://"+EzG+EZU; // Show Redirect in Submit Button
 EzGoNow(EZU,"EzGoShort");}				// Send Short URL to an EzClx New Window
// *** 321
// EzShorten() Structures Long URLs and Short Codes for the YOURLS Link Shortener API
function EzShorten(LUL,SID)				// (LongURL,ShortURLcode)
{if(SID==undefined||SID==null||SID=="")SID=""		// Default Missing Short URL Code to Blank
 if(LUL==undefined||LUL==null||LUL==""){alert("Please enter a URL to Shorten.");return;} // Missing Long URL
 LUL=EzFixURL(LUL);                            		// Add Missing "http://" and/or ".com" If needed
 var ULU="http://EzClx.us/admin/index.php?u="+escape(LUL)+"&t=Link"+escape(" by EzClx:"); // URI Encode
 if(SID)ULU=ULU+"&k="+SID;				// Add Short URL to Shortener Call to EzClx
 EzGoNow(ULU,"EzShorten"); return LUL;}			// Send Long and Short URLs to EzClx Shorten in a New Window
// *** 330
// EzUnload() Used Primarially as a Wrapper for Code Launched on the Unload or BeforeUnload events: Works Best w I.E.
function EzUnload(EZU,EZW,EZY)				// (Target URL,Optional New Window Flag,Optional Max Launch Count)
{if(EZW==undefined)EZW="ExitWin";			// Default to Open In New Window
 if(EZY==undefined||isNaN(EZY)||EZY<0)EZY=0;		// Default Launched Flag/Count Limit to 1
 if(EzY<=EZY)EzGoNow(EZU,EZW);}				// Quit if Max Launched Count Exceded else Launch URL
