var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById &&  d.documentElement.behaviorUrns))  ? true : false;

function createEmail(first,second,third,linkclass)
{
        var str="";
        if (linkclass.lenght!=0) str=" class='"+linkclass+"' ";
        document.write("<a href='mailto:"+first+"@"+second+"."+third+"'"+str+">"+first+"@"+second+"."+third+"</a>") ;
}

function bodySize(){
	if(winIE && d.documentElement.clientWidth) {
		sObj = d.getElementById("minWidth").style;
		sObj.width = (d.documentElement.clientWidth<=974) ? "974px" : "auto";
	}
}
function init(){
	initMenu();
	if(winIE) { bodySize(); }
 }
 
onload = init;

if(winIE) { onresize = bodySize; }

var agt = navigator.userAgent.toLowerCase ();
var is_major = parseInt (navigator.appVersion);
var is_minor = parseFloat (navigator.appVersion);
var is_ie      = ((agt.indexOf ("msie") != -1) && (agt.indexOf ("opera") == -1) && (agt.indexOf ("safari") == -1));
var is_opera = (agt.indexOf ("opera") != -1 && agt.indexOf ("7.0") != -1);

function initMenu() { 
	if (is_ie || is_opera){
		if	(document.getElementById("navmenu")){
			nodes = document.getElementById("navmenu").getElementsByTagName("LI");
			if (nodes) {
				for (var i=0; i<nodes.length; i++) { 
					if (nodes[i].parentElement.id=="navmenu"){
						nodes[i].onmouseover = function() { 
							this.className += (this.className!='')?" over":"over"; 
						} 
						nodes[i].onmouseout = function() { 
							this.className = this.className.replace(new RegExp(" over\\b"), "").replace(new RegExp("over\\b"), ""); 
						}
					} 
				} 
			}
		}
	}
}
