function popup(x) {
	self.name="main"
	var popup_popup = window.open( x+".html", "popup", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=360,height=340")
	popup_popup.focus()
}


window.onresize = function()
{
	setLogo()
}

window.onload = function()
{
	setLogo()
}

function setLogo() {
	var myWidth = 0, myHeight = 0;
	var bname = ""

	if (typeof(window.innerWidth)=='number') {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		bname = "IE"
	}

	var bplat = navigator.platform
	if (bname == "IE" && bplat == "MacPPC") {
		myWidth = "100%"
	}
	document.getElementById('logodiv').style.width = myWidth
}



function navon(x) {
	navoff();
	if (x == "products") {document.getElementById('products').src="graphics/nav_products_on.gif"}
	if (x == "buy") {document.getElementById('buy').src="graphics/nav_buy_on.gif"}
	if (x == "apiary") {document.getElementById('apiary').src="graphics/nav_apiary_on.gif"}
	//if (x == "news") {document.getElementById('news').src="graphics/nav_news_on.gif"}
	if (x == "contact") {document.getElementById('contact').src="graphics/nav_contact_on.gif"}
}

function navoff() {
	document.getElementById('products').src="graphics/nav_products.gif"
	document.getElementById('buy').src="graphics/nav_buy.gif"
	document.getElementById('apiary').src="graphics/nav_apiary.gif"
	//document.getElementById('news').src="graphics/nav_news.gif"
	document.getElementById('contact').src="graphics/nav_contact.gif"
}

