function changePosition(divId, divLeft, divTop) {
document.getElementById(divId).style.left = divLeft;
document.getElementById(divId).style.top = divTop;
}
function menuHover(divId, zbgColor, ztextColor) {
document.getElementById(divId).style.backgroundColor=zbgColor;
document.getElementById(divId).style.color = ztextColor;
}
function runThisOnLoad() {
//this function sets the 'onmouseover's and 'onmouseout's of all the elements, thus making things a lot easier to tweak around and whatnot.
div1_width = document.getElementById('div1').offsetWidth;
div2_width = document.getElementById('div2').offsetWidth;
div3_width = document.getElementById('div3').offsetWidth;
div4_width = document.getElementById('div4').offsetWidth;
wdv1= 10;
wdv2= div1_width+10;
wdv3= div2_width+div1_width+10;
wdv4= div3_width+div2_width+div1_width+10;

//main menu links 
//div1
document.getElementById('div1').onmouseover=function(e) {menuHover(this.id, '#CCCCFF', 'black'); }
document.getElementById('div1').onmouseout=function(e) {menuHover(this.id, '#112a91', '#EEEEEE');}
document.getElementById('div1').onclick=function(e) {window.location="index.shtml";}

//div2
document.getElementById('div2').onmouseover=function(e) {changePosition('subdiv2', wdv2+'px', '20px'); menuHover(this.id, '#CCCCFF', 'black');}
document.getElementById('div2').onmouseout=function(e) {changePosition('subdiv2', '-1000px', '20px'); menuHover(this.id, '#112a91', '#EEEEEE');}

//div3
document.getElementById('div3').onmouseover=function(e) {menuHover(this.id, '#CCCCFF', 'black'); }
document.getElementById('div3').onmouseout=function(e) {menuHover(this.id, '#112a91', '#EEEEEE'); }
document.getElementById('div3').onclick=function(e) {window.location="contact.shtml";}

//div4
document.getElementById('div4').onmouseover=function(e) {menuHover(this.id, '#CCCCFF', 'black'); }
document.getElementById('div4').onmouseout=function(e) {menuHover(this.id, '#112a91', '#EEEEEE'); }
document.getElementById('div4').onclick=function(e) {window.location="privacy.shtml";}

//sub menu links
//subdiv1
document.getElementById('subdiv1').onmouseover=function(e) {changePosition('subdiv1', wdv1+'px', '20px'); menuHover('div1', '#CCCCFF', 'black');}
document.getElementById('subdiv1').onmouseout=function(e) {changePosition('subdiv1', '-1000px', '20px'); menuHover('div1', '#112a91', '#EEEEEE');}

//subdiv2
document.getElementById('subdiv2').onmouseover=function(e) {changePosition('subdiv2', wdv2+'px', '20px'); menuHover('div2', '#CCCCFF', 'black');}
document.getElementById('subdiv2').onmouseout=function(e) {changePosition('subdiv2', '-1000px', '20px'); menuHover('div2', '#112a91', '#EEEEEE');}

//subdiv3
document.getElementById('subdiv3').onmouseover=function(e) {changePosition('subdiv3', wdv3+'px', '20px');menuHover('div3', '#CCCCFF', 'black');}
document.getElementById('subdiv3').onmouseout=function(e) {changePosition('subdiv3', '-1000px', '20px'); menuHover('div3', '#112a91', '#EEEEEE');}

//subdiv4


//sub-sub menu links
//submenu1
	//submenu1_1
document.getElementById('submenu1_1').onmouseover=function(e) {changePosition(this.id, wdv1-1+div1_width, '25px'); changePosition('subdiv1', wdv1, '20px');menuHover('div1', '#CCCCFF', 'black');}
document.getElementById('submenu1_1').onmouseout=function(e) {changePosition(this.id, '-1000px', '20px'); changePosition('subdiv1', '-1000px', '25px');menuHover('div1', '#112a91', '#EEEEEE');}
	//submenu1_2
document.getElementById('submenu1_2').onmouseover=function(e) {changePosition(this.id, wdv1+div1_width-1, '100px'); changePosition('subdiv1', wdv1, '20px');menuHover('div1', '#CCCCFF', 'black');}
document.getElementById('submenu1_2').onmouseout=function(e) {changePosition(this.id, '-1000px', '20px'); changePosition('subdiv1', '-1000px', '25px');menuHover('div1', '#112a91', '#EEEEEE');}

//submenu2
document.getElementById('submenu2').onmouseover=function(e) {changePosition(this.id, wdv2+div2_width-1, '85px'); changePosition('subdiv2', wdv2, '20px');menuHover('div2', '#CCCCFF', 'black');}
document.getElementById('submenu2').onmouseout=function(e) {changePosition(this.id, '-1000px', '20px'); changePosition('subdiv2', '-1000px', '30px');menuHover('div2', '#112a91', '#EEEEEE');}

//submenu3
document.getElementById('submenu3').onmouseover=function(e) {changePosition(this.id, wdv3+div3_width-1, '75px'); changePosition('subdiv3', wdv3, '20px');menuHover('div3', '#CCCCFF', 'black');}
document.getElementById('submenu3').onmouseout=function(e) {changePosition(this.id, '-1000px', '20px'); changePosition('subdiv3', '-1000px', '35px');menuHover('div3', '#112a91', '#EEEEEE');}

//submenu4
document.getElementById('submenu4').onmouseover=function(e) {changePosition(this.id, wdv4+div4_width-1, '100px'); changePosition('subdiv4', wdv4, '20px');menuHover('div4', '#CCCCFF', 'black');}
document.getElementById('submenu4').onmouseout=function(e) {changePosition(this.id, '-1000px', '20px'); changePosition('subdiv4', '-1000px', '40px');menuHover('div4', '#112a91', '#EEEEEE');}

//the subsubmenu links

//link2_4
document.getElementById('link2_4').onmouseover=function(e) {changePosition('submenu2', wdv2+div2_width-1, '85px');}
document.getElementById('link2_4').onmouseout=function(e) {changePosition('submenu2', '-1000px', '20px');}
}



function formVerify(theForm) {
	if(theForm.name.value.length<1 || theForm.comment.value.length<1) {
		if(theForm.name.value.length<1) {
			theForm.name.style.backgroundColor = "#FFCC33";
			if(theForm.comment.value.length>0) {
				theForm.comment.style.backgroundColor = "white";
				}
			return_false = true;
		}
		if(theForm.comment.value.length<1) {
			if(theForm.name.value.length>0) {
				theForm.name.style.backgroundColor = "white";
			}
			theForm.comment.style.backgroundColor = "#FFCC33";
			return_false = true;
		}
	} else {
		theForm.comment.style.backgroundColor = "white";
		theForm.name.style.backgroundColor = "white";
		return true;
	}
	if(return_false) {
	return false;
	}
}