function menuOn( id ){
	document.getElementById( 'menu_' + id ).className = 'menuon';
}

function menuOff( id ){
	document.getElementById( 'menu_' + id ).className = 'menuoff';
}

function getDocHeight() {
    var D = document;
    return Math.max(
    	getViewportHeight(),
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

function getObjectHeight( O ) {
    return Math.max(
        Math.max(O.scrollHeight, O.scrollHeight),
        Math.max(O.offsetHeight, O.offsetHeight),
        Math.max(O.clientHeight, O.clientHeight)
    );
}

function getViewportHeight(){
	if ( typeof window.innerWidth != 'undefined' ) {
		return window.innerHeight;
	} else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0 ) {
		return document.documentElement.clientHeight;
	} else {
		return document.getElementsByTagName('body')[0].clientHeight;
	}
}




function picOpen(a,b,c){
	var c = c.split("x");
	popup_left = ( screen.width -  c[0] ) / 2 - 20;
	popup_top  = ( screen.height - c[1] ) / 2 - 20;
	open ("pre/picopen.html?" + a + "--pre--" + b,'fnet_pic','width=' + c[0] + ',height=' + c[1] + ',top='+popup_top+',left='+popup_left+',location=no,menubar=no,status=no,titlebar=no,resizable=no,scrollbars=no,toolbar=no');
}


