<!--//Function to check/compare string, find browser and find version located 2 characters after itfunction checkIt(string){	place = detect.indexOf(string) + 1;	thestring = string;	return place;}//Drop userAgent to all lower casevar detect = navigator.userAgent.toLowerCase();var OS,browser,version,total,thestring;if (checkIt('konqueror')){	browser = "Konqueror";	OS = "Linux";}else if (checkIt('opera')) browser = "Opera"else if (checkIt('webtv')) browser = "WebTV";else if (checkIt('icab')) browser = "iCab"else if (checkIt('msie')) browser = "Internet Explorer"else if (!checkIt('compatible')){	browser = "Netscape Navigator"	version = detect.charAt(8);}else {browser = "An unknown type browser";version = "Unkown version";}//Get the versionif (!version) version = detect.charAt(place + thestring.length);//Get the Operating systemif (!OS){	if (checkIt('linux')) OS = "Linux";	else if (checkIt('x11')) OS = "Unix";	else if (checkIt('mac')) OS = "Mac"	else if (checkIt('win')) OS = "Windows"	else OS = "an unknown operating system";}
var minwidth=1024;
var minheight=768;
var zerowidth=0;
var zeroheight=0;
if (screen.width>=minwidth||screen.height>=minheight){
//if (screen.width>=minwidth||screen.height>=minheight) || (screen.width=zerowidth||screen.height=zeroheight){
	if (OS == "Windows") {		if (browser == "Internet Explorer") {			document.write('<link rel="stylesheet" href="lib/css_globalbx/wie_style.css" type="text/css">');
			//alert("browser = "+browser+version);		} else if (browser == "Netscape Navigator" && version < "5") {			document.write('<link rel="stylesheet" href="lib/css_globalbx/wnc_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version >= "5"){			//document.write({zoom:90%});			//document.write(nsIDOMWindow::SetTextZoom(2.0));
			document.write('<link rel="stylesheet" href="lib/css_globalbx/wnc_style.css" type="text/css">');		} else {			document.write('<link rel="stylesheet" href="lib/css_globalbx/wie_style.css" type="text/css">');		}	} else {		if (browser == "Internet Explorer" && version >= "5") {			document.write('<link rel="stylesheet" href="lib/css_globalbx/mie_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version < "5"){			document.write('<link rel="stylesheet" href="lib/css_globalbx/mnc_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version >= "5"){			document.write('<link rel="stylesheet" href="lib/css_globalbx/mns_style.css" type="text/css">');		} else {			document.write('<link rel="stylesheet" href="lib/css_globalbx/mie_style.css" type="text/css">');		}	}	
}
//resolution is < 1024 * 768
else{
	if (OS == "Windows") {		if (browser == "Internet Explorer") {			document.write('<link rel="stylesheet" href="lib/css_globalbx2/wie_style.css" type="text/css">');
			//alert("browser = "+browser+version);		} else if (browser == "Netscape Navigator" && version < "5") {			document.write('<link rel="stylesheet" href="lib/css_globalbx2/wnc_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version >= "5"){
			//alert("browser = "+browser+version);			//document.write({zoom:90%});			//document.write(nsIDOMWindow::SetTextZoom(2.0));
			document.write('<link rel="stylesheet" href="lib/css_globalbx2/wnc_style.css" type="text/css">');		} else {			document.write('<link rel="stylesheet" href="lib/css_globalbx2/wie_style.css" type="text/css">');		}	} else {		if (browser == "Internet Explorer" && version >= "5") {			document.write('<link rel="stylesheet" href="lib/css_globalbx2/mie_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version < "5"){			document.write('<link rel="stylesheet" href="lib/css_globalbx2/mnc_style.css" type="text/css">');		} else if (browser == "Netscape Navigator" && version >= "5"){			document.write('<link rel="stylesheet" href="lib/css_globalbx2/mns_style.css" type="text/css">');		} else {			document.write('<link rel="stylesheet" href="lib/css_globalbx2/mie_style.css" type="text/css">');		}	}	
}function makewin (targurl, width, height, winopts) {  if (navigator.userAgent.indexOf("MSIE 3.0") == -1 && navigator.appVersion.indexOf("2.0") == -1)    {      if (window.sidebars == null)	{	  sidebars = new Object;	  sidebars.length = 5;	}      allopts = "width=" + width + ",height=" + height + "," + winopts;      var tempref = window.open(targurl, "sidebar2" + sidebars.length, allopts);            sidebars[sidebars.length] = tempref;      sidebars.length++;    }  else    {      self.location.href = targurl;    }}function killwins() {  if (navigator.userAgent.indexOf("MSIE 3.0") != -1 && window.sidebars != null)    {      for (i = 1; i < sidebars.length; i++)	{	  sidebars[i].close();	}    }}
//document.write("<script type='text/javascript' src='jscripts/dynamic_css2.js'></script>");//document.write('<scr'+'ipt type="text/javascript" src="jscripts/dynamic_css2.js" ></scr'+'ipt>'); 
//load_CSS();

//dynamic_css2
var colMoved = false;
var intId;
var n = 0;

var CSS = {

        load: /*static*/ function (url_, /*optional*/ media_)
        {
	        // We are preventing loading a file already loaded
	        var _links = document.getElementsByTagName("link");
	        var _head = document.getElementsByTagName("head")[0];               
	       
	        // Loop through the length of the links
	        for( i = 0; _links.length > i; i++)
	        {
	            // If the href is already present, remove it
	            if (_links[i]["href"] == url_)
	            {
	                _head.removeChild(_links[i]);
	            }
	        }
	
	        // Optional parameters check
	        var _media = media_ === undefined || media_ === null ? "all" : media_;
	       
	        // Build link element
	        var _elstyle = document.createElement("link");
	        _elstyle.setAttribute("rel", "stylesheet");
	        _elstyle.setAttribute("type", "text/css");
	        _elstyle.setAttribute("media", _media);
	        _elstyle.setAttribute("href", url_);
	
	        // Add style
	        _head.appendChild(_elstyle);
        }
};

function load_CSS(){
 	var wd = screen.width;
 	if (wd <= 800){
		//CSS.load('css/all_800x600_2.css');
		document.write('<link rel="stylesheet" href="css/all_800x600_2.css" type="text/css">');		
		//document.getElementById('imgBanner1').src = 'images/commercial-loan-7.gif';
	} else{		
		//CSS.load('css/all2.css');		
		document.write('<link rel="stylesheet" href="css/all2.css" type="text/css">');		
	}
	
	if(wd == 1024){
		//CSS.load('css/all_1024.css');
		document.write('<link rel="stylesheet" href="css/all_1024.css" type="text/css">');
	} 
	else if (wd == 1152)
	{
		//CSS.load('css/all_1152.css');
		document.write('<link rel="stylesheet" href="css/all_1152.css" type="text/css">');		
	}
	else if (wd == 1280)
	{
		//CSS.load('css/all_1280.css');
		document.write('<link rel="stylesheet" href="css/all_1280.css" type="text/css">');		
	}
	else if (wd >= 1400)
	{
		//CSS.load('css/all_1400.css');
		document.write('<link rel="stylesheet" href="css/all_1400.css" type="text/css">');		
	}

}

function launchInit(){		
	setColumnHeights();
	// Cannot call init() directly, as FF has not applied CSS when called from OnLoad event
	intId = setInterval("setColumnHeights()",100);
	return true;
}

function setColumnHeights(){
	alert("Setting column heights");
	if (typeof document.getElementById('col1') != 'object'){
	 	if (n > 100)
			clearInterval(intId);
		return false;
	}
	
	var divCol1 = document.getElementById('col1Box2Mid');
	var divCol2 = document.getElementById('col2Box2Mid');
	var divCol3 = document.getElementById('col3Box3Mid');

	var h1 = document.getElementById('col1').offsetHeight;
	var h2 = document.getElementById('col2').offsetHeight;
	var h3 = document.getElementById('col3').offsetHeight;	
	
	if (h1 > 1200 || h2 > 1200 || h3 > 1200)	
		return false;
	
	//alert('col 1='+h1.toString() +  ' , col 2=' + h2.toString() +  ' , col 3='+ h3.toString() );
	var divPageLoader = document.getElementById('divPageLoader');
	//var sLoadText = divPageLoader.innerText;

	var hNew = 0;
	var h = getMaxNumber(h1, h2);
	var h = getMaxNumber(h, h3);	
	//alert(h);	
	var b='OO';
	// For Firefox -------------------
	if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
	b='FF';	
		if (screen.width == 800) {
			divCol1.style.height = '431px';
			divCol2.style.height = '772px';
			divCol3.style.height = '580px';
		}else{
			if (h1 <= h){
			 	//alert('changing h1');
				hNew = divCol1.offsetHeight + h - h1;				
				divCol1.style.height = hNew.toString()+ 'px';		
			}				
			
			if (h2 <= h){
			 	//alert('changing h2');
				hNew = divCol2.offsetHeight + h - h2;	    
				divCol2.style.height = hNew.toString()+ 'px';		
			}			
			
			if (h3 <= h){
			 	//alert('changing h3');
				hNew = divCol3.offsetHeight + h - h3 ;	    
				divCol3.style.height = hNew.toString()+ 'px';		
			}	
		}
	}
	
	// For IE -------------------
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
	//b='IE';
		if (screen.width == 800) {
			divCol1.style.height = '460px';
			divCol2.style.height = '790px';
			divCol3.style.height = '580px';
		}else{
			if (h1 <= h){
				hNew = divCol1.offsetHeight + (h - h1) - 10;	
				divCol1.style.height = hNew.toString()+ 'px';		
			}
			
			if (h2 <= h){
				hNew = divCol2.offsetHeight + (h - h2) - 10;	    
				divCol2.style.height = hNew.toString()+ 'px';		
			}			
			
			if (h3 <= h){
				hNew = divCol3.offsetHeight + (h - h3) - 10;	    
				divCol3.style.height = hNew.toString()+ 'px';		
			}					
			//alert(hNew);
		}
	}
	
	n++;
	//window.status = 'col 1='+h1.toString() +  ' , col 2=' + h2.toString() +  ' , col 3='+ h3.toString() + ', col1.top=' + document.getElementById('col1').offsetTop + ', n=' + n.toString()+ ', b='+ b + ', hNew='+hNew;
	
	h1 = document.getElementById('col1').offsetHeight;
	h2 = document.getElementById('col2').offsetHeight;
	h3 = document.getElementById('col3').offsetHeight;

	if ((h1 == h2 && h2 == h3)){		
		divPageLoader.style.display = 'none';
		clearInterval(intId);		
	}

	return true;
}

function getMaxNumber(n1, n2){
	if (n1 > n2)
		return n1;
	else
		return n2;
}

load_CSS();

window.google_analytics_uacct = "UA-1926061-1";//-->
