<!--
var dqm__codebase = "scripts/"; //script folder location
//------------------------------------------------------------------------------
//IMAGE PRELOADER
//Navigation Image Preloading
var NavBut1= new Image;
NavBut1.src='/images/joinemailbut.gif';
var NavBut11= new Image;
NavBut11.src='/images/joinemailbut1.gif';

//------------------------------------------------------------------------------
function DoNavButSwap(imgname,imgsrc){	
	eval("document."+imgname+".src="+imgsrc+".src");

}

//------------------------------------------------------------------------------
function popup(url,name,prop){
	//Hwnd = window.open(url,name,prop);
	//Hwnd.focus();
	try
	{
		Hwnd = window.open(url,name,prop);
		Hwnd.focus();
	}
	catch(e)
	{		
		//alert("This site uses a limited number of pop-ups to assist you in placing your order.\nIt appears you have a pop-up blocker installed.\nPlease disable the blocker before proceeding further.");
		alert("This site uses a limited number of pop-ups to assist you.\nIt appears you have a pop-up blocker installed.\nPlease disable the blocker before proceeding further.");
	}

}
//------------------------------------------------------------------------------
function goTo(url)
{
	exit=false;
	document.location.href=url;
}
//------------------------------------------------------------------------------
String.prototype.trim = function() {
	var x=this;
	x=trimString(x);
	 return x;
}

function trimString(sString)
{
	sTrimmedString = "";
	if (sString != "")
	{
		var iStart = 0;
		var iEnd = sString.length - 1;
		var sWhitespace = " \t\f\n\r\v";
	  
		while (sWhitespace.indexOf(sString.charAt(iStart)) != -1)
		{
			iStart++;
			if (iStart > iEnd)
				break;
		}
	  
		// If the string not just whitespace
		if (iStart <= iEnd)
		{
			while (sWhitespace.indexOf(sString.charAt(iEnd)) != -1)
			iEnd--;
			sTrimmedString = sString.substring(iStart,++iEnd);
		}
	}
	return sTrimmedString;
}
//------------------------------------------------------------------------------
function setCookie( cookieName, cookieValue, lifeTime, path, domain, isSecure ) 
{	
	if( !cookieName ) { return false; }
	if( lifeTime == "delete" ) { lifeTime = -10; } //this is in the past. Expires immediately.

	/* This next line sets the cookie but does not overwrite other cookies.
	syntax: cookieName=cookieValue[;expires=dataAsString[;path=pathAsString[;domain=domainAsString[;secure]]]]
	Because of the way that document.cookie behaves, writing this here is equivalent to writing
	document.cookie = whatIAmWritingNow + "; " + document.cookie; */
	document.cookie = escape( cookieName ) + "=" + escape( cookieValue ) +
		( lifeTime ? ";expires=" + ( new Date( ( new Date() ).getTime() + ( 1000 * lifeTime ) ) ).toGMTString() : "" ) +
		( path ? ";path=" + path : "") + ( domain ? ";domain=" + domain : "") + 
		( isSecure ? ";secure" : "");
	//check if the cookie has been set/deleted as required
	
	if( lifeTime < 0 ) { if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return false; } return true; }
	if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return true; } return false;
}

//------------------------------------------------------------------------------
function retrieveCookie( cookieName ) 
{
	/* retrieved in the format
	cookieName4=value; cookieName3=value; cookieName2=value; cookieName1=value
	only cookies for this domain and path will be retrieved */
	var cookieJar = document.cookie.split( "; " );
	for( var x = 0; x < cookieJar.length; x++ ) {
		var oneCookie = cookieJar[x].split( "=" );
		if( oneCookie[0] == escape( cookieName ) ) { return unescape( oneCookie[1] ); }
	}
	return null;
}
//------------------------------------------------------------------------------
//-->


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_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_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];}
}
/*------------------------------------------------------------------------------*/
String.prototype.trim = function() {
	var x=this;
	x=trimString(x);
	 return x;
}

function trimString(sString)
{
	sTrimmedString = "";
	if (sString != "")
	{
		var iStart = 0;
		var iEnd = sString.length - 1;
		var sWhitespace = " \t\f\n\r\v";
	  
		while (sWhitespace.indexOf(sString.charAt(iStart)) != -1)
		{
			iStart++;
			if (iStart > iEnd)
				break;
		}
	  
		// If the string not just whitespace
		if (iStart <= iEnd)
		{
			while (sWhitespace.indexOf(sString.charAt(iEnd)) != -1)
			iEnd--;
			sTrimmedString = sString.substring(iStart,++iEnd);
		}
	}
	return sTrimmedString;
}
//--
