//**************************************************************************************
var cancelClick=false;
var pageReady=false;
var maySelect=true;
var NN = (document.layers) ? 1 : 0;
var Opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
var IE = (document.all && !Opera)? true : false;
var NN6= (document.getElementById && !IE && !Opera)?true:false;
//**************************************************************************************
// paths section
var siteRoot = "";
var cgiPath  = "";
//**************************************************************************************
var wName;
//**************************************************************************************
maySelect = true;
//**************************************************************************************
function tOv() {}
function tOf() {}
function popTop() {}
function changeImages() {}
function clrT() {}
function clsT() {}
//**************************************************************************************
function randomName() 
{
 var d = new Date();
 return String(Math.random(d.getTime())).replace(/\./g, "");
}
//**************************************************************************************
function NewWindow(mypage, myname, w, h, scroll, resizable) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable;
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) 
		{ win.window.focus(); }
}
//**************************************************************************************
function setCookie(nam, val) 
{
	document.cookie = nam + "=" + val + ";";
}
//**************************************************************************************
function  openMailWindow() 
{
 if (! isNotBroker)	return;
 
 if (findCookie("sd_register") == "")
{

		setCookie("sd_register", "yes");
		if (!wName) { wName = randomName(); }
		var vName = "mailWindow" + wName;
		
		var wLeft = 100;
		var wTop = 100;
		var wWidth = (document.all ? 407 : 407);
		var wHeight = 270;
		var wProps = "width="+wWidth+",height="+wHeight+",top="+wTop+",left="+wLeft+",resizable=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no";
		var url = "regform_db.pl?act=add";
		wm = window.open(url, vName, wProps)
  	        wm.focus();
	}
 return;	
}
//**************************************************************************************
function previewAd(fn, _w, _h)
{
	if (!wName) {
		wName = randomName();
	}
	w_ = !_w ? 580 : _w; 
	h_ = !_h ? 520 : _h;
	var iName = "imgWindow" + wName;
    w = window.open(fn, iName,
                        "width=" + w_ + ",height=" + h_ + ",resizable=yes,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes");
    w.focus();
}
//**************************************************************************************
function ShowCopyRight(link)
{
 if (opener)
 	{
 	 opener.location.href=link;
 	 opener.focus();
     this.window.close();	
    } 
 return;
}
//**************************************************************************************
function findCookie(szName) 
{
  var i = 0;
  var nStartPosition = 0;
  var nEndPosition = 0;  
  var szCookieString = document.cookie;  

  while(i <= szCookieString.length) 
  {
    nStartPosition = i;
    nEndPosition = nStartPosition + szName.length;

    if(szCookieString.substring( 
        nStartPosition,nEndPosition) == szName) 
    {
      nStartPosition = nEndPosition + 1;
      nEndPosition = 
        document.cookie.indexOf(";",nStartPosition);

      if(nEndPosition < nStartPosition)
        nEndPosition = document.cookie.length;

      return document.cookie.substring( 
          nStartPosition,nEndPosition);  
      break;    
    }
    i++;  
  }
  return "";
}


/* cookie name for brochure */
var brochureCookieName = "brochureCookie";
var BC_ebrochure = "1";
var BC_carribean = "2";