﻿function setSize() {
	var myWidth = 0, myHeight = 0;
	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;
	}
	winwidth = myWidth;
	winheight = myHeight;
	if (document.getElementById("outerimgs")) {
		document.getElementById("outerimgs").style.width = winwidth+'px';
	}
	document.getElementById("footertbl").style.width = (winwidth-33)+'px';
}

var laktuell = "";

function m_over(arg) {
	if (arg != laktuell) {
		for(i=0;i<=endcount;i++) {
			if (i == arg) {
				visibility = 'visible';
				bgcolor = '#5a7f96';
				color = '#ffffff';
			} else {
				visibility = 'hidden';
				bgcolor = '#ffffff';
				color = '#5a7f96';
			}
			if (document.getElementById("link"+i)) {
				if (document.getElementById("subnav"+i)) {
					document.getElementById("subnav"+i).style.visibility = visibility;
					document.getElementById("sublinks"+i).style.visibility = visibility;
				}
				document.getElementById("link"+i).style.backgroundColor = bgcolor;
				document.getElementById("link"+i).style.color = color;
			} else {
				break;
			}
		}
	}
}
	  
function m_out(arg) {
	if (arg >= count) {
		if ("link"+arg != laktuell) {
			document.getElementById("link"+arg).style.backgroundColor = '#ffffff';
			document.getElementById("link"+arg).style.color = '#5a7f96';
		}
		document.getElementById(laktuell).style.backgroundColor = '#5a7f96';
		document.getElementById(laktuell).style.color = '#ffffff';
	} else {
		return;
	}
}

function m_klick(arg) {
	if (laktuell != "") {
		document.getElementById(laktuell).style.color = "#5a7f96";
		document.getElementById(laktuell).style.backgroundColor = '#ffffff';
	}
	if (document.getElementById(arg)) {
		document.getElementById(arg).style.color = "#ffffff";
		document.getElementById(arg).style.backgroundColor = "#5a7f96";
		laktuell = arg;
	}
}

function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}

function orderpop(picpath) {
	window.open('order_prints.php?picpath='+picpath,'','width=620,height=472');
}

