var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));

var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie   = (agt.indexOf("msie") != -1);
var is_ie3  = (is_ie && (is_major < 4));
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1));
var is_ie4up  = (is_ie  && (is_major >= 4));
var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera4 = (is_opera && (is_major == 4));
var is_opera5 = (is_opera && (is_major == 5));
var is_opera5up = (is_opera && (is_major >= 5));

var is_domcom = ((is_nav6up)||(is_ie5up)||(is_opera5up))
var is_mac    = (agt.indexOf("mac")!=-1);
var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1)));
var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1)));


//**************************
//NOFLASH PAGE VERSION BEGIN
//**************************

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i];
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 &&
(navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}



//************************
//NOFLASH PAGE VERSION END
//************************


var _timeout	= 500;

function getElementByIds(_id) {

	var _el;

	if(is_domcom) {
		_el	= document.getElementById(_id);
	} else if(is_ie4) {
		_el	= document.all[_id];
	}

	return _el;
}

function _showMenu(_objID) {
	var _obj	= getElementByIds(_objID);
	if(_obj) {
		_obj.style.display	= 'block';
	}
}

function _hideMenu(_objID) {
	var _obj	= getElementByIds(_objID);
	if(_obj) {
		_obj.style.display	= 'none';
	}
}

/*************************************************
 *	shows element with id passed as parameter
 *************************************************/
function doOver(_id) {

	var _el	= getElementByIds(_id);
	if(_el) {
		if(_el.timer) {
			clearTimeout(_el.timer);
		}
		 _showMenu(_id);
	}
}

/*************************************************
 *	hides element with id passed as parameter
 *************************************************/

var time

function doOut(_id) {

	var _el	= getElementByIds(_id);

	if(_el) {
		var _timer	= setTimeout("_hideMenu('" + _id + "')", _timeout);
		_el.timer	= _timer;
	}
}

//function GO TO ATTORNEY EXTRANET begin
function changeLocationToExtranet(){
	window.location.href='https://webserver2.obrienlevine.com/rbweb/attorney/';
}
//function GO TO ATTORNEY EXTRANET end

function stretchLeft() {
	$contentH = document.getElementById('contentDiv').offsetHeight;
	$stretchNeed = $contentH - 400;
	document.getElementById('fush').style.height = $stretchNeed + 'px';
	document.getElementById('fush').style.width = '217px';
	//alert ($contentW);
}

function printHome() {
	window.open('/?print','homePrint','width=725, height=600,location=no, status=no, scrollbars=yes, left=150, top=150, menubar=yes, resizable=yes, directories=no');
}


function copyFromFields() {
	document.formSchedule.contactName.value = document.formSchedule.schedName.value;
	document.formSchedule.princAddress.value = document.formSchedule.address1.value;
	document.formSchedule.princAddress2.value = document.formSchedule.address2.value;
	document.formSchedule.princCity.value = document.formSchedule.city.value;
	$test = document.formSchedule.state.selectedIndex;
	document.formSchedule.princState.options[$test].selected = true;
	document.formSchedule.princZip.value = document.formSchedule.zip.value;

}


function copyFromFields2() {
	document.formSchedule.billName.value = document.formSchedule.schedName.value;
	document.formSchedule.billCompany.value = document.formSchedule.firmName.value;
	document.formSchedule.billAddress.value = document.formSchedule.address1.value;
	document.formSchedule.billAddress2.value = document.formSchedule.address2.value;
	document.formSchedule.billCity.value = document.formSchedule.city.value;
	document.formSchedule.billZip.value = document.formSchedule.zip.value;
	$tests = document.formSchedule.state.selectedIndex;
	document.formSchedule.billState.options[$tests].selected = true;
}

function copyFromFields4() {
	document.formSchedule.billName.value = document.formSchedule.schedName.value;
	document.formSchedule.billCompany.value = document.formSchedule.company.value;
	document.formSchedule.billAddress.value = document.formSchedule.address1.value;
	document.formSchedule.billAddress2.value = document.formSchedule.address2.value;
	document.formSchedule.billCity.value = document.formSchedule.city.value;
	document.formSchedule.billZip.value = document.formSchedule.zip.value;
	$tests = document.formSchedule.state.selectedIndex;
	document.formSchedule.billState.options[$tests].selected = true;
}

function copyFromFields3() {
	document.formSchedule.contactName.value = document.formSchedule.schedName.value;
	document.formSchedule.company2.value = document.formSchedule.company.value;
	document.formSchedule.email2.value = document.formSchedule.email.value;
	document.formSchedule.phoneNumber2.value = document.formSchedule.phone.value;
}


/*
function stretchMain() {
	$contentH = document.getElementById('columnServicesLast').offsetHeight;
	$stretchNeed = $contentH - 400;
	document.getElementById('ColumnMostDiv').style.height = $stretchNeed + 'px';
	document.getElementById('ColumnMostDiv').style.width = '217px';

}*/

//window.onload = stretchMain();