//this function is used to change logo when the mouse is rolled over the 
//menu items 1)commercial insurance 2)home and auto and 3)employee benefits
function td_mouseover(tablecell, rollover, caller) {
	//alert(caller);
	var rollback='';
	switch (caller) {
		case 'home': {rollback='images/brysonlogo.gif';break;}
		case 'commercial': {rollback='images/brysonlogo.gif';break;}
		case 'homeandauto': {rollback='images/brysonlogo.gif';break;}
		case 'employeebenefits': {rollback='images/brysonlogo.gif';break;}
		default : {rollback='images/brysonlogo.gif';break;}
	}
	window.document.getElementById('bryson_logo').src=rollover;
	tablecell.style.color='#8da3cb';
	tablecell.onmouseout=function(){window.document.getElementById('bryson_logo').src=rollback;tablecell.style.color='#ffffff';return;};
}
//this function is called on page load and shows random promotions on the start page
//	0- Home and Auto
//	1- Commercial
function loadPromotion() {
	var promo=(parseInt(10*Math.random())+1) % 2;
	//alert(promo);
	switch (promo) {
		case 0: {
			document.getElementById('promo_image').src='images/promo_homeauto.gif';
			top.main.document.getElementById('titlerow').className='contenttitle_homeauto';
			top.main.document.getElementById('titlecell').className='contenttitle_homeauto';
			top.main.document.getElementById('subtitlerow').className='content_homeauto';
			top.main.document.getElementById('subtitlecell_1').className='contentsubtitle_homeauto';
			top.main.document.getElementById('subtitlecell_2').className='contentdiv_homeauto';
			top.main.document.getElementById('subtitlecell_3').className='contentsubtitle_homeauto';
			top.main.document.getElementById('contentrow').className='content_homeauto';
			top.main.document.getElementById('contentcell_1').className='content_homeauto';
			top.main.document.getElementById('contentcell_3').className='content_homeauto';
			break;
		}
		case 1: {
			document.getElementById('promo_image').src='images/promo_commercial.gif';
			top.main.document.getElementById('titlerow').className='contenttitle_commercial';
			top.main.document.getElementById('titlecell').className='contenttitle_commercial';
			top.main.document.getElementById('subtitlerow').className='content_commercial';
			top.main.document.getElementById('subtitlecell_1').className='contentsubtitle_commercial';
			top.main.document.getElementById('subtitlecell_2').className='contentdiv_commercial';
			top.main.document.getElementById('subtitlecell_3').className='contentsubtitle_commercial';
			top.main.document.getElementById('contentrow').className='content_commercial';
			top.main.document.getElementById('contentcell_1').className='content_commercial';
			top.main.document.getElementById('contentcell_3').className='content_commercial';
			break;
		}
	}
}
function openPDFWindow(width,height,pageurl) {
	x=(640-width)/2,y=(480-height)/2;
	if (screen) {
	    y=(screen.availHeight-height)/2;
		x=(screen.availWidth-width)/2;
	}
	window.open(pageurl,null,'width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}
