  function PopUp(url,wsize,hsize,resize)
  {
    window.open(url, 'childwin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,width='+wsize+',height='+hsize+',resizable='+resize);
  }

  function WinOpen(url,wsize,hsize,resize)
  {
     window.open(url, 'childwin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,width='+wsize+',height='+hsize+',resizable='+resize)
  }

  function openWinView(url)
  {
    winview=window.open(url, 'winview', 'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,resizable=yes,width=600,height=500,scrollbars=yes');
    winview.focus();
  }

  function SearchButton( targetURL )
  {
  	this.lnk = new Link();
  	this.lnk.href=targetURL;
  	this.img = new Image();
  	this.img.src = "/solucient/images/btnSearchOff.gif";
  	document.write('<img src="http://solucient.ecnext.com/solucient/images/btnSearchOff.gif"/>');
  	//document.write('<img src="http://solucient.ecnext.com/solucient/images/btnSearchOff.gif"/>');
  	
  }

  function changeButton2(myImage)
  {
    re=/On\.gif/;

    found=re.exec(myImage.src);

    if  (found == 'On.gif')
    {
      re = /On\.gif/;
      newSrc=myImage.src.replace(re,'Off.gif');
      myImage.src=newSrc;
    }else{
      re = /Off\.gif/;
      newSrc=myImage.src.replace(re,'On.gif');
      myImage.src=newSrc;
    }

  }

  function changeButton(myImage)
  {

    re=/On\.gif/;

    found=re.exec(myImage.src);

    if  (found == 'On.gif')
    {
      re = /On\.gif/;
      newSrc=myImage.src.replace(re,'Off.gif');
      myImage.src=newSrc;
    }else{
      re = /Off\.gif/;
      newSrc=myImage.src.replace(re,'On.gif');
      myImage.src=newSrc;
    }

  }
  
  function RUSure()
  {
    if(confirm("Are you sure you want to\nclear the entire form?"))
    {
      document.registration.reset();
    }
    else
    {
      return;
    }
  }

//------------------- BEGIN CART ABANDONMENT CODE ---------------------------------------
var locallink=false;
function setupLinks()
{
		var unsecure_url = 'http://lyra.ecnext.com/';
		var secure_url = 'https://lyra.ecnext.com/';
    var j=0;
    for (var i=0;i<document.links.length;i++)
    {
        if ((document.links[i].href.substring(0, unsecure_url.length) == unsecure_url) ||
            (document.links[i].href.substring(0, secure_url.length) == secure_url) ||
            (document.links[i].href.substring(0,4) != 'http'))
        {
            document.links[i].onclick = function(){ locallink = true };
        }
    }
}

function checkExit()
{
    var cookieval = getCookieSurvey('proffer');
    if (cookieval == null || cookieval != 1)
    //if (location.href != "http://lyra.ecnext.com/comsite5/bin/comsite5.pl?page=proffer")
    //if (0)
    {
        if (!locallink)
        {
            var expdate = new Date ();
            expdate.setTime (expdate.getTime() + (31 * 24 * 60 * 60 * 1000)); // 10 years from now
            setCookieSurvey('proffer','1',expdate,'/','lyra.ecnext.com','');
	window.open("http://lyra.ecnext.com/comsite5/bin/comsite5.pl?page=proffer","","toolbar=0, location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=653,height=259");
        }
    }
}
	
function setCookieSurvey(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookieVal (offset)
{
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset,   endstr));
}

function getCookieSurvey (name)
{
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen)
    {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
          return getCookieVal (j);
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
    }
    return null;
}
//------------------------ END CART ABANDONMENT CODE ------------------------------------