function softIntercept(url, name, target, intercept){
	if(intercept == 'True'){
		openDialog("/includes/soft_intercept.asp?url="+ url + "&name=" + name + "&target=" + target,'460','380','yes');
	}else{
		if (target == 'new'){
			openDialog(url,'460','380','yes');
		}else{
			document.location.href = url;		
		}
	}
}

function ltrim (s){
return s.replace(/^\s*/, "")
}

function rtrim (s){
return s.replace(/\s*$/, "");
}

function trim (s){
return rtrim(ltrim(s));
}

function open_window(url) 
{
	window.open(url, "Living",'toolbar=yes,location=1,directories=0,status=0,menubar=no,scrollbars=1,resizable=1,width=640,height=395')
}

function open_Window_c(url) 
{
	popupWin = window.open(url, 'openGM', 'toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=0,width=200,height=150,top=10,left=10')
}

function open_Window_b(url) 
{
	popupWin = window.open(url, 'openWin', 'toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=0,width=410,height=590,top=10,left=550')
}

function open_Window_a(url) 
{
	window.open(url, 'openWin', 'scrollbars,width=640,height=395,left=10,top=10,toolbar,menubar,status,location,resizable')
}	

function open_Window_d(url) 
{
	window.open(url, 'openWin', 'width=250,height=250,left=40,top=30,resizable=no')
}	

function open_Window_contact(url) 
{
	window.open(url, 'contact', 'scrollbars,width=770,height=581,left=10,top=10,toolbar,menubar,status,location,resizable')
}

function emailThisPage(thisURL, thisTitle) 
{
	window.open('/includes/email_this_page.asp?url='+thisURL+'&title='+thisTitle, 'emailThisPage', 'toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=0,width=450,height=295,top=10,left=10')
}

  if(!((parseInt(navigator.appVersion)<4) && (navigator.appName.toLowerCase().indexOf("microsoft")>-1))) {
  if (parseInt(navigator.appVersion)<3)
    J11=false;
  else
    J11=true;
  }
  else
    J11=false;
	
  var imHeads;

  var swapIm = new Array();
  var old = "";
  var oldSrc = "";
  var old2 = "";
  var oldSrc2 = "";

 var Im= new Array(	"/images/arrow_lit.gif");

 if(J11) {
   for(i in Im) {
      swapIm[i] = new Image();
	  swapIm[i].src = Im[i];
   }
 }  
function getSrc(n){
    img = n.toString(); 
 	eval("n = document." + img + ".src"); 
 	if(n.indexOf("_lit")< 0){
 		dot = n.lastIndexOf(".");
 		temp = n.substr(dot,n.length).toString();
		orig = n.substr(0,dot).toString();
		newsrc = orig + "_lit" + temp;
	 	newsrc = newsrc.toString();
 	return newsrc;
 	}
	else{return n;}
 }

function swap(imgname) {
       n = arguments[0].toString();

   		eval("oldSrc = document." + n + ".src");
   		old = n;
  		eval("document." + n + ".src=getSrc('" + imgname + "')");
 }
   
   function back() {
    if(J11) {
     eval("document." + old + ".src=oldSrc");
    }
   }
