if(navigator.appName.indexOf("Netscape") != -1 && navigator.userAgent.indexOf("Gecko") == -1)
	document.write("<LINK REL=\"StyleSheet\" href=\"/extensions/addon_ns.css\" type=\"text/css\">");

if(navigator.userAgent.indexOf("Netscape6") != -1)
	document.write("<LINK REL=\"StyleSheet\" href=\"/extensions/addon_ns6.css\" type=\"text/css\">");

function clearsel(where,what) {
	var count = document.forms[where].elements[what].length;
	for(i=count-1;i>=0; i--) {
		document.forms[where].elements[what].options[i] = null;
	}
}

function loadindustry(pleaseChoose) {
	clearsel('search','kategorie');
	clearsel('products','kategorie');
	document.forms['search'].elements['kategorie'].options[document.forms['search'].elements['kategorie'].length] = new Option(pleaseChoose,"-",true,true);
	document.forms['products'].elements['kategorie'].options[document.forms['products'].elements['kategorie'].length] = new Option(pleaseChoose,"-",true,true);
	for(i=0;i<industry2.length; i++) {
	         var tmp = industry2[i].split("|");
			 document.forms['search'].elements['kategorie'].options[document.forms['search'].elements['kategorie'].length] = 
			 	new Option(tmp[0],industry2[i],false,false);
		}
	for(i=0;i<industry1.length; i++) {
			 var tmp = industry1[i].split("|");
			 document.forms['search'].elements['kategorie'].options[document.forms['search'].elements['kategorie'].length] = 
			 	new Option(tmp[0],industry1[i],false,false);
			 document.forms['products'].elements['kategorie'].options[document.forms['products'].elements['kategorie'].length] = 
			 	new Option(tmp[0],industry1[i],false,false);
		}	
}

		
function loadHelptext() {
	var helptext = helpmsg[document.forms['countryhelp'].elements['countries'].options[document.forms['countryhelp'].elements['countries'].selectedIndex].value];

	if(document.getElementById)
		document.getElementById("helptext").innerHTML = helptext;
	else if(document.all)
		document.all.helptext.innerHTML = helptext;
	else if(document.layers) {
		document.layers['container'].document.layers['helptext'].document.open();
		document.layers['container'].document.layers['helptext'].document.write("<span class=\"text\">" + helptext + "</span>");
		document.layers['container'].document.layers['helptext'].document.close();
	}
}

function popup(url,name,param) {
	var sizeX = 0;
	var sizeY = 0;
	var winX=screen.availWidth;
	var winY=screen.availHeight;
	
	var tmpArray = param.split(",");
	for(i=0;i<tmpArray.length;i++) {
		if(tmpArray[i].indexOf("width") != -1) { tmpArray2 = tmpArray[i].split("="); sizeX = tmpArray2[1];}
		if(tmpArray[i].indexOf("height") != -1) { tmpArray2 = tmpArray[i].split("="); sizeY = tmpArray2[1];}
	}
		
	var centerX=eval(winX/2-sizeX/2);
	var centerY=eval(winY/2-sizeY/2);
	
	param +=',top='+centerY+',left='+centerX;
	var winChild = window.open(url,name,param+',dependent=yes');
	winChild.focus();
}

function window80(url) {
	window.open(url,'','toolbar,menubar,scrollbars,location,toolbar,resizable,status,top='+parseInt(screen.availHeight/2-screen.availHeight*0.8/2)+',left='+parseInt(screen.availWidth/2-screen.availWidth*0.8/2)+',height='+parseInt(screen.availHeight*0.8-180)+',width='+parseInt(screen.availWidth*0.8));
}

function clearBreadcrumb() {
	if(top.frames.length==0 && (navigator.appName.indexOf("Netscape")==-1 ||  navigator.appName=="")) {
		window.name = "" ;
	}
}

function setBreadcrumb(which, url) {
	if(top.frames.length==0 && (navigator.appName.indexOf("Netscape")==-1 ||  navigator.appName=="")) {
		if(which != "Home" ) {
			if(url.indexOf(".jsp")!=-1)
				url = "/schuelke-mayr"+url;
		 	if(window.name.indexOf(which)==-1 && which.indexOf("_smi")==-1) {
				if(window.name != "") window.name +=  "%";
				window.name += which+"|"+url;
			}
			else if(window.name.substring(0,window.name.lastIndexOf("%")).indexOf(which)!=-1)
				window.name = window.name.substring(0,window.name.lastIndexOf("%"));
		}
		else
			clearBreadcrumb();
	}
}

function writeBreadcrumb() {
	if(top.frames.length==0 && (navigator.appName.indexOf("Netscape")==-1 ||  navigator.appName=="")) {
		var tmpBreadCrumb= "";
		if(window.name != "") {
			var breadcrumb = window.name.split("%");
			for(i=0; i<breadcrumb.length-1; i++) {
				tmpBreadCrumb += breadcrumb[i];
				//document.write(" <span class=\"msn-link\">&gt;</span> <a href=\"javascript:history.go(-"+(parseInt(breadcrumb.length)-i-1)+");\" onclick=\"setBreadcrumbRoot('"+tmpBreadCrumb+"%"+breadcrumb[i+1]+"');\">"+breadcrumb[i]+"</a>");
				document.write(" <span class=\"msn-link\">&gt;</span> <a href=\""+breadcrumb[i].substring(breadcrumb[i].lastIndexOf("|")+1)+"\" onclick=\"setBreadcrumbRoot('"+tmpBreadCrumb+"%"+breadcrumb[i+1].substring(0,breadcrumb[i+1].indexOf("|"))+"');\">"+breadcrumb[i].substring(0,breadcrumb[i].indexOf("|"))+"</a>");
				tmpBreadCrumb += "%";
			}
			document.write(" <span class=\"msn-link\">&gt;</span> <span id=\"active_msn\">"+breadcrumb[i].substring(0,breadcrumb[i].indexOf("|"))+"</span>");
		}
	}
}

function getBreadcrumbRoot() {
	if(top.frames.length==0 && (navigator.appName.indexOf("Netscape")==-1 ||  navigator.appName=="")) {
		if(window.name.indexOf("%")!=-1)
			return window.name.substring(0,window.name.indexOf("%"));
		else
			return window.name;
	}
}

function setBreadcrumbRoot(which,url) {
	if(top.frames.length==0 && (navigator.appName.indexOf("Netscape")==-1 ||  navigator.appName=="")) {
		window.name = which;
	}
}

if(!window.saveInnerWidth) {
  window.onresize = resize;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}

function resize() {
    if (saveInnerWidth < window.innerWidth || saveInnerWidth > window.innerWidth || saveInnerHeight > window.innerHeight || saveInnerHeight < window.innerHeight ) 
    {
        window.history.go(0);
    }
}