// menue.js
// dropdown menue


var is;
var init = false;

function createBrowserInfo() {
	var ua = navigator.userAgent.toLowerCase();
	
	this.isOpera = (ua.indexOf('opera') != -1); 	

	this.dom = (document.getElementById) ? true:false;
	this.ns4 = (document.layers) ? true:false;
	this.ns6 = (this.dom && document.defaultView != null) ? true:false;
	this.ie = (document.all) ? true:false;
	this.opera  = (this.dom && window.opera) ? true:false;
	this.mac = (navigator.userAgent.indexOf("Mac") != -1);
	this.win = (navigator.userAgent.indexOf("Win") != -1);
}


function debugBrowser() {
	var mString = "";
	for (var attribute in is)
	{
		mString = mString + "\n B: " + attribute + " : " + is[attribute] + " : ";
	}
	alert(mString);
	
}

function initPage()
{
	is = new createBrowserInfo();
	init = true;
}
function m_mo(pid, sid, len)
{
	tb = 's'+sid;
	ta = 'a'+sid;
	tmp = document.getElementById(pid);
	tmp.className = 'menumo';
	tmp = document.getElementById(ta);
	tmp.className = 'menut';

	ts = document.getElementById(tb)
	if (sid > 1) {
		t = sid - 1;
		ta = 's'+t;
		tsa = document.getElementById(ta);
		tsa.className = 'menumo';
	}
	if (sid < len){
		ts.className = 'menumo';
	}
}
function m_mout(pid, sid, len)
{
	tb = 's'+sid;
	ta = 'a'+sid;
	tmp = document.getElementById(pid);
	tmp.className = 'menu';
	tmp = document.getElementById(ta);
	tmp.className = 'menu';
	
	ts = document.getElementById(tb)
	if (sid > 1) {
		t = sid - 1;
		ta = 's'+t;
		tsa = document.getElementById(ta);
		tsa.className = 'menu';
	}
	if (sid < len){
		ts.className = 'menu';
	}
}


function printVersion(mycid) {
	printurl = "print.php?cid="+mycid;
	window.open(printurl,"PrintVersion","width=750,height=400,left=100,top=100, scrollbars=yes, toolbar=yes");	
}

function printVersionForum(mycid, msid, mpage) {
	printurl = "print.php?cid="+mycid+"&sid="+msid+"&page="+mpage;
	window.open(printurl,"PrintVersion","width=750,height=400,left=100,top=100, scrollbars=yes, toolbar=yes");	
}