var seconds;

function swapReiter ( reiter_num ) {
	for (var i=0; i<document.getElementsByTagName("div").length; i++) {
		if (document.getElementsByTagName("div")[i].id.indexOf("reiter")!=-1) {
			if (document.getElementsByTagName("div")[i].id.indexOf(reiter_num)!=-1) {
				document.getElementsByTagName("div")[i].className="reiterActive";
				document.getElementsByTagName("div")[i].onmouseover="";
				document.getElementsByTagName("div")[i].onmouseout="";
				document.getElementById("content"+reiter_num).style.display = "block";
			} else {
				document.getElementsByTagName("div")[i].className="reiterSub";
				document.getElementsByTagName("div")[i].onmouseover= function anonymous() { this.className='reiterOver'; }
				document.getElementsByTagName("div")[i].onmouseout= function anonymous() { this.className='reiterSub'; }
				reiter_number = document.getElementsByTagName("div")[i].id.split("reiter");
				document.getElementById("content"+reiter_number[1]).style.display = "none";
			}
		}
	}
}

function setTarget( website ) {
	for (var i=0; i<document.links.length; i++) {
		if (!((document.links[i].href.indexOf(website)!=-1)||(document.links[i].href.indexOf("javascript")!=-1)||(document.links[i].href.indexOf("kms")!=-1)||(document.links[i].href.indexOf("../")!=-1))) {
			document.links[i].target = "_blank";
		}
	}
}

function setTargetTop( website ) {
	for (var i=0; i<document.links.length; i++) {
		if (!((document.links[i].href.indexOf(website)!=-1)||(document.links[i].href.indexOf("javascript")!=-1)||(document.links[i].href.indexOf("kms")!=-1)||(document.links[i].href.indexOf("../")!=-1))) {
			document.links[i].target = "_blank";
		} else {
			document.links[i].target = "_top";
		}
	}
}

function doc_id () {
	var doc_id_pre_pre = "";
	var doc_id_pre = "";
	
	if (top.frames.length<=1) {
		doc_id_pre = location.search.split("str_id=");
		if (doc_id_pre.length >1) {
			if (doc_id_pre[1].indexOf("&")==-1) {
				return doc_id_pre[1];
			} else {
				doc_id_pre_pre = doc_id_pre[1].split("&");
				return doc_id_pre_pre[0];
			}
		}
	} else {
		for (var i=0; i<top.frames.length; i++) {
			if (top.frames[i].location.search.indexOf("str_id=")!=-1) {
				doc_id_pre = top.frames[i].location.search.split("str_id=");
				if (doc_id_pre.length >1) {
					if (doc_id_pre[1].indexOf("&")==-1) {
						return doc_id_pre[1];
					} else {
						doc_id_pre_pre = doc_id_pre[1].split("&");
						return doc_id_pre_pre[0];
					}
				}
			}
		}
	}
}

function setIframeSize(target,offsetx,offsety,parent) {
	if((parseInt(navigator.appVersion) > 3) && (document.getElementById(target) != null)) {
		// Netscape
		if (navigator.appName=="Netscape") { 
	 		if (typeof parent != "undefined") {
		 		winH = eval("top."+parent).innerHeight; 
		 		winW = eval("top."+parent).innerWidth; 
		 	} else {
		 		winH = window.innerHeight; 
		 		winW = window.innerWidth; 
		 	}
		}
		// Opera
		else if (navigator.userAgent.indexOf("Opera")!=-1) { 
			winH = document.body.offsetHeight; 
			winW = document.body.offsetWidth; 
		}
		// IE
		else if (navigator.appName.indexOf("Microsoft")!=-1) {
			if (navigator.userAgent.indexOf("Mac")!=-1) {
				winH = document.body.scrollHeight;
				winW = document.body.scrollWidth;
			} else {
				winH = document.body.offsetHeight; 
				winW = document.body.offsetWidth; 
			}
		}
	
	if (parseInt(offsetx) != 0) { document.getElementById(target).style.width = winW - parseInt(offsetx); }
	document.getElementById(target).style.height = winH - parseInt(offsety);
	}
}

function showLayerUser(id,icon) {
	if(document.getElementById(id).style.display == "none") {
		document.getElementById(id+"Icon").src = "../img/" + icon + "_open.gif";
		document.getElementById(id).style.display = ""
	} else {
		document.getElementById(id+"Icon").src = "../img/" + icon + "_close.gif";
		document.getElementById(id).style.display = "none"
	}
}

function showLayer(id,icon) {
	if(document.getElementById(id).style.display == "none") {
		document.getElementById(id+"Icon").src = "../img/pfeil_ab.gif"
		document.getElementById(id).style.display = ""
	} else {
		document.getElementById(id+"Icon").src = "../img/pfeil_rechts.gif"
		document.getElementById(id).style.display = "none"
	}
}

function showLayerForm(id) {
	if(document.getElementById(id).style.display == "none") {
		document.getElementById(id+"Icon").src = "../img/pfeil_ab_form.gif"
		document.getElementById(id).style.display = ""
	} else {
		document.getElementById(id+"Icon").src = "../img/pfeil_rechts_form.gif"
		document.getElementById(id).style.display = "none"
	}
}

function showAllLayer(vis) {
	for(i=0; i<document.images.length; i++) {
		if(document.images[i].name.indexOf("lay") != -1) {
			layer_name = document.images[i].name.substr(0,document.images[i].name.length-4);
			document.getElementById(layer_name).style.display = vis;
			document.getElementById(layer_name+"Icon").src = (vis == "") ? "../img/pfeil_ab.gif" : "../img/pfeil_rechts.gif";
		}
	}
}

function highlight( obj, col ) {
	obj.style.backgroundColor = col;
}

function showSubLayer(id) {
	for(i=1; i<5; i++) {
		document.getElementById("sublayer"+i).style.display = "none";
	}

	document.getElementById("sublayer"+id).style.display = "";
}

// Browser funktionen
function openWindow( file, width, height ) {
	remoteWin = window.open(file,"k1remote","width="+width+",height="+height+",scrollbars=yes")
	remoteWin.focus();
}

function closeWindow() {
	window.close();
}

// alle checkboxen einer übersicht auswählen
function checkAll( form, fieldname ) {
	if(typeof fieldname == "undefined") fieldname = "checkall";
	
	for(i=0; i<form.length; i++) {
		if(form[i].name.indexOf(fieldname+"_") != -1) {
			eval("form[i].checked = form."+fieldname+".checked;");
		}
	}
}

function focusNext( curr_field, next_field, maxlength ) {
	if(curr_field.value.length == maxlength) {
		next_field.focus();
		next_field.select();
	}
}

// Warnung vor Konvertierung
function alertADMconv() {
	if(confirm("ACHTUNG!\n\nAlle Projekt-, Kunden-, Benutzer-\nund Protokolldaten werden gelöscht!\n\nFortfahren?")) { document.location.href="adm_convert.php?action=convert"; }
}

// Notizen positionieren
function note_repos() {
	i=0;
	lastX=15;
	lastY=340;
	/*
	while(i < 300) {
		if(typeof document.getElementById("drag_notiz"+i) == "undefined") { break; }
		
		document.getElementById("drag_notiz"+i).style.left = lastX;
		document.getElementById("drag_notiz"+i).style.top  = lastY;
		
		if(document.getElementById("drag_notiz"+i).style.left < 600) {
			document.getElementById("drag_notiz"+i).style.left += 180;
		} else {
			document.getElementById("drag_notiz"+i).style.left = 15;
			document.getElementById("drag_notiz"+i).style.top += 150;
		}
		
		i++;
	}
	*/
}

// Zeitanzeige beim Portal
function showTime() {
	var datum = new Date();
	var Stunden = datum.getHours();
	var Minuten = (datum.getMinutes() < 10) ? "0"+datum.getMinutes() : datum.getMinutes();
	//var Sekunden = (datum.getSeconds() < 10) ? "0"+datum.getSeconds() : datum.getSeconds();
	
	seconds = (seconds == ":") ? "<font color=\"#d7e7f8\">:</font>" : ":";
	
	document.getElementById("uhrzeit").innerHTML = Stunden+seconds+Minuten+" Uhr";
	setTimeout("showTime()",1000);
}

// Suchformular submit
function submitSEAform() {
	if(document.sea.sea_word.value == "") { alert("Bitte geben Sie ein Suchwort ein!"); }
	else {
		document.sea.submit();
	}
}


function popImg(iName,iDesc) {

                pInfo='menubar=0,';
                pInfo+='scrollbars=no,';
                pInfo+='width=150,';
                pInfo+='height=200';

	winId = window.open('','newwin', pInfo);
	winId.document.open();
	winId.document.write("<HTML>");
	winId.document.write("<HEAD>");
	winId.document.write("<TITLE>"+iDesc+"</TITLE>");
	winId.document.write("<script language=\"JavaScript\">");
	winId.document.write("var popImg=new Image(); popImg.src=\""+iName+"\";");
	winId.document.write("if (navigator.userAgent.indexOf('Safari')!=-1) { popImg.onload=FitContent; }");
	winId.document.write("function FitContent() { ");
	winId.document.write("	if ((navigator.userAgent.indexOf('MSIE')!=-1)&&(navigator.userAgent.indexOf('Mac')==-1)) { ");
	winId.document.write("		iWidth = document.images['bild'].width - document.body.offsetWidth; ");
	winId.document.write("		iHeight = document.images['bild'].height - document.body.offsetHeight; ");
	winId.document.write("	} else if (navigator.userAgent.indexOf('Safari')!=-1) { ");
	winId.document.write("		iWidth = document.images['bild'].width - parseInt(window.innerWidth); ");
	winId.document.write("		iHeight = document.images['bild'].height - parseInt(window.innerHeight); ");
	winId.document.write("	} else if ((navigator.userAgent.indexOf('Netscape')!=-1) || ((navigator.userAgent.indexOf('Mozilla')!=-1)&&(navigator.userAgent.indexOf('Gecko')!=-1))) { ");
	winId.document.write("		window.resizeTo(1024,768); ");
	winId.document.write("		iWidth = document.images['bild'].width - window.innerWidth; ");
	winId.document.write("		iHeight = document.images['bild'].height - window.innerHeight; ");
	winId.document.write("	} else { ");
	winId.document.write("		iWidth = document.images['bild'].width - document.body.scrollWidth; ");
	winId.document.write("		iHeight = document.images['bild'].height - document.body.scrollHeight; ");
	winId.document.write("	} ");
	winId.document.write("	window.resizeBy(iWidth, iHeight); ");
	winId.document.write("	self.focus(); ");
	winId.document.write("} ");
	winId.document.write("</script>");
	winId.document.write("</HEAD>");
	winId.document.write("<BODY onload=\"FitContent();\" bgcolor=\"#ffffff\" topmargin=\"0\" marginheight=\"0\" leftmargin=\"0\" marginwidth=\"0\">");
	winId.document.write("<img src='"+iName+"' name=\"bild\" hspace=\"0\" vspace=\"0\">");
	winId.document.write("</BODY>");
	winId.document.write("</HTML>");
	winId.document.close();
	
}

function FitContent() { 
	iWidth = 0;
	iHeight = 0;
	if (navigator.userAgent.indexOf("MSIE")!=-1) {
		if (navigator.userAgent.indexOf("Opera")!=-1) {
			iWidth = document.body.offsetWidth+10;
			iHeight = document.body.scrollHeight+40;
		} else if (navigator.userAgent.indexOf("Mac")!=-1) {
			iWidth = parseInt(document.body.offsetWidth);
			iHeight = parseInt(document.body.offsetHeight);
		} else {
			iWidth = document.body.scrollWidth+20;
			iHeight = document.body.scrollHeight+60;
		}
	} else if (navigator.userAgent.indexOf("Safari")!=-1) {
		iWidth = parseInt(document.body.scrollWidth);
		iHeight = parseInt(document.body.clientHeight);
		iHeight+=40;
	} else {
		iWidth = document.documentElement.scrollWidth;
		iHeight = document.body.scrollHeight;
		if (navigator.userAgent.indexOf("Mac")!=-1) { iHeight+=8; }
		else { iHeight+=40; }
	}
	window.resizeTo(iWidth, iHeight+15);
	self.focus(); 
}


function frameImg(iName,iDesc,iText,iLink,fName) {
  winId = eval("top."+fName);
  winId.document.open();
  winId.document.write("<title>"+iDesc+"</title>");
  winId.document.write("<link href=\"../../includes/styles.css\" rel=\"stylesheet\" media=\"screen\">");
  winId.document.write("<body bgcolor=\"#666666\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><center>");
  winId.document.write("<table border=0 cellpadding=3 cellspacing=0 width=180><tr><td bgcolor=\"#555555\" height=120 width=180 height=120 align=\"left\" valign=\"top\"><img src=\"../../img/trans.gif\" width=170 height=1>");
  winId.document.write("<img src=\"" + iName + "\" name=\"bild\" hspace=5 vspace=5>");
  winId.document.write("</td></tr><tr><td bgcolor=\"#666666\" class=\"fliesstext\" valign=\"top\" height=100>");
  winId.document.write("<b>"+iDesc+"</b><br>"+iText+"<br><a href='mailto:"+iLink+"' class=\"link\">"+iLink+"</a>");
  winId.document.write("</td></tr></table></center></body>");
  winId.document.close();
}

function checkFileType ( fileName ) {

	var fileTypes = new Array();
	
	fileTypes["type"] = new Array();
	fileTypes["icon"] = new Array();
	
	fileTypes["type"][0] = "no typical";
	fileTypes["icon"][0] = "all.gif";
	
	fileTypes["type"][1] = "avi";
	fileTypes["icon"][1] = "avi.gif";

	fileTypes["type"][2] = "doc";
	fileTypes["icon"][2] = "doc.gif";

	fileTypes["type"][3] = "htm";
	fileTypes["icon"][3] = "htm.gif";

	fileTypes["type"][4] = "html";
	fileTypes["icon"][4] = "html.gif";

	fileTypes["type"][5] = "mov";
	fileTypes["icon"][5] = "mov.gif";

	fileTypes["type"][6] = "mp3";
	fileTypes["icon"][6] = "mp3.gif";

	fileTypes["type"][7] = "mpg";
	fileTypes["icon"][7] = "mpg.gif";

	fileTypes["type"][8] = "pdf";
	fileTypes["icon"][8] = "pdf.gif";

	fileTypes["type"][9] = "ppt";
	fileTypes["icon"][9] = "ppt.gif";

	fileTypes["type"][10] = "rar";
	fileTypes["icon"][10] = "rar.gif";

	fileTypes["type"][11] = "swf";
	fileTypes["icon"][11] = "swf.gif";

	fileTypes["type"][12] = "txt";
	fileTypes["icon"][12] = "txt.gif";

	fileTypes["type"][13] = "wav";
	fileTypes["icon"][13] = "wav.gif";

	fileTypes["type"][14] = "xls";
	fileTypes["icon"][14] = "xls.gif";

	fileTypes["type"][15] = "zip";
	fileTypes["icon"][15] = "zip.gif";
	
	fileTypes["type"][16] = "jpg";
	fileTypes["icon"][16] = "jpg.gif";
	
	fileTypes["type"][17] = "gif";
	fileTypes["icon"][17] = "gif.gif";
	
	fileTypes["type"][18] = "tif";
	fileTypes["icon"][18] = "tif.gif";
	
	fileTypes["type"][19] = "psd";
	fileTypes["icon"][19] = "psd.gif";
	
	fileTypes["type"][20] = "ai";
	fileTypes["icon"][20] = "ai.gif";
	
	fileTypes["type"][21] = "eps";
	fileTypes["icon"][21] = "ai.gif";
	
	fileTypes["type"][22] = "ttf";
	fileTypes["icon"][22] = "ttf.gif";
	
	fileTypes["type"][23] = "indd";
	fileTypes["icon"][23] = "indd.gif";
	
	var foundFileType = false;
	
	for (var i=0; i<fileTypes["type"].length; i++) {
		if (fileName.indexOf("." + fileTypes["type"][i])!=-1) {
			return fileTypes["icon"][i];
			break;
			foundFileType = true;
		}
	}
	
	if (!foundFileType) {
		return fileTypes["icon"][0];
	}

}

function checkMediaType ( fileName ) {

	var fileTypes = new Array();
	
	fileTypes["type"] = new Array();
	fileTypes["icon"] = new Array();
	
	fileTypes["type"][0] = "no typical";
	fileTypes["icon"][0] = "all.gif";
	
	fileTypes["type"][1] = "ai";
	fileTypes["icon"][1] = "ai.gif";

	fileTypes["type"][2] = "eps";
	fileTypes["icon"][2] = "eps.gif";

	fileTypes["type"][3] = "psd";
	fileTypes["icon"][3] = "psd.gif";

	fileTypes["type"][4] = "tiff";
	fileTypes["icon"][4] = "tiff.gif";

	fileTypes["type"][5] = "jpg";
	fileTypes["icon"][5] = "jpeg.gif";

	fileTypes["type"][6] = "jpeg";
	fileTypes["icon"][6] = "jpeg.gif";

	fileTypes["type"][7] = "gif";
	fileTypes["icon"][7] = "gif.gif";

	fileTypes["type"][8] = "pict";
	fileTypes["icon"][8] = "pict.gif";

	fileTypes["type"][9] = "png";
	fileTypes["icon"][9] = "png.gif";

	fileTypes["type"][10] = "indd";
	fileTypes["icon"][10] = "indd.gif";

	fileTypes["type"][11] = "pdf";
	fileTypes["icon"][11] = "pdf.gif";

	fileTypes["type"][12] = "tt";
	fileTypes["icon"][12] = "tt.gif";

	fileTypes["type"][13] = "ps";
	fileTypes["icon"][13] = "ps.gif";

	fileTypes["type"][14] = "doc";
	fileTypes["icon"][14] = "doc.gif";

	fileTypes["type"][15] = "xls";
	fileTypes["icon"][15] = "xls.gif";

	fileTypes["type"][16] = "ppt";
	fileTypes["icon"][16] = "ppt.gif";

	var foundFileType = false;
	
	for (var i=0; i<fileTypes["type"].length; i++) {
		if (fileName.indexOf("." + fileTypes["type"][i])!=-1) {
			return fileTypes["icon"][i];
			break;
			foundFileType = true;
		}
	}
	
	if (!foundFileType) {
		return fileTypes["icon"][0];
	}

}

var swap_Sub_0 = "";
var swap_Sub_1 = "";
var swap_Sub_2 = "";
var swap_Sub_3 = "";
var swap_Sub_4 = "";
var swap_Sub_5 = "";
var sub_0 = "";
var sub_1 = "";
var sub_2 = "";
var sub_3 = "";
var sub_4 = "";
var sub_5 = "";

function pullSub( sub_nav, level ) {
	if(sub_nav != "") { 
		switch (level) {
			case "0":	if ((typeof swap_Sub_0 != "string")&&(sub_0==sub_nav)) { clearTimeout(swap_Sub_0); }
				 		swap_Sub_0 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_0 = sub_nav;
						break;
			case "1": 	if ((typeof swap_Sub_1 != "string")&&(sub_1==sub_nav)) { clearTimeout(swap_Sub_1); }
						swap_Sub_1 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_1 = sub_nav;
						break;
			case "2": 	if ((typeof swap_Sub_2 != "string")&&(sub_2==sub_nav)) { clearTimeout(swap_Sub_2); }
				 		swap_Sub_2 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_2 = sub_nav;
						break;
			case "3": 	if ((typeof swap_Sub_3 != "string")&&(sub_3==sub_nav)) { clearTimeout(swap_Sub_3); }
				 		swap_Sub_3 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_3 = sub_nav;
						break;
			case "4": 	if ((typeof swap_Sub_4 != "string")&&(sub_4==sub_nav)) { clearTimeout(swap_Sub_4); }
				 		swap_Sub_4 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_4 = sub_nav;
						break;
			case "5": 	if ((typeof swap_Sub_5 != "string")&&(sub_5==sub_nav)) { clearTimeout(swap_Sub_5); }
				 		swap_Sub_5 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'block'",500);
				 		sub_5 = sub_nav;
						break;
		}
	}
}

function pushSub( sub_nav, level ) {

	if(sub_nav != "") { 
		switch (level) {
			case "0": clearTimeout(swap_Sub_0);swap_Sub_0 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
			case "1": clearTimeout(swap_Sub_1);swap_Sub_1 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
			case "2": clearTimeout(swap_Sub_2);swap_Sub_2 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
			case "3": clearTimeout(swap_Sub_3);swap_Sub_3 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
			case "4": clearTimeout(swap_Sub_4);swap_Sub_4 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
			case "5": clearTimeout(swap_Sub_5);swap_Sub_5 = setTimeout("document.getElementById('"+sub_nav+"').style.display = 'none'",500); break;
		}
	}
}


function menuRoll( item, item_class ) {

	if(typeof item == "object") { item.className = item_class; }	

}

function add_usr() {
	was_in_list = false;
	
	for(i=0; i<document.sur.usr_id.length; i++) {
		in_list = false;
		
		if(document.sur.usr_id[i].selected) {
			// prüfen, ob der benutzer bereits mitglied ist
			for(j=0; j<document.sur.members.length; j++) {
				if(document.sur.members[j].value == document.sur.usr_id[i].value) { in_list = true; was_in_list = true; }
			}
			
			if(!in_list) {
				new_sur_usr = new Option(document.sur.usr_id[i].text,document.sur.usr_id[i].value,false,false);
				document.sur.members.options[document.sur.members.length] = new_sur_usr;
				document.sur.sur_usr_id.value += document.sur.usr_id[i].value+",";
				FitContent();
			}
		}
	}
	
	if(was_in_list) { alert("Einige der ausgewählten Benutzer sind bereits Mitglieder"); }
}

function del_usr() {
    old_usr = document.sur.sur_usr_id.value.split(',');
    new_usr = new Array();
    
	if(document.sur.members.length > 0) {
	    for(j=0; j<document.sur.members.length; j++) {
	        if(document.sur.members[j].selected) {
		        document.sur.members[j] = null;
		        j--;
	        } else {        
		        new_usr.push(document.sur.members[j].value)
		    }
		}
		
		new_usr_val = new_usr.join(",")+",";
		document.sur.sur_usr_id.value = new_usr_val.replace(",,",",");
	} else{
		alert("Es muss mindestens ein Mitglied vorhanden sein!");
	}
}


function translateWin( ent, key, id ) {
	remoteTRA = window.open("../adm/tky.php?action=popup&ent="+ent+"&key="+key+"&id="+id,"remoteTRA","width=100,height=100");
	remoteTRA.focus();
}

		if (window.name == "") {window.name = "Default"}
		else {
			if (navigator.userAgent.indexOf("Microsoft")!=-1) {
				if ((window.name!="Default") || (window.name!="Large") || (window.name!="Larger") || (window.name!="Small") || (window.name!="Smaller")) {
					windowName = "Default";
				} else {
					windowName = window.name;
				}
				for (var i=0; i<document.styleSheets.length; i++) {
					if ((document.styleSheets[i].id==windowName)||(document.styleSheets[i].id=="")) {
						document.styleSheets[i].disabled = false;
					} else {
						document.styleSheets[i].disabled = true;
					}
				}
			}
		}		
		
		function changeTextSize ( direction ) {
		
			if (direction == "+") {
				switch (window.name) {
					case "Smaller": 	window.name = "Small"; 		break;
					case "Small": 		window.name = "Default"; 	break;
					case "Default": 	window.name = "Large"; 		break;
					case "Large": 		window.name = "Larger"; 	break;
					default: 			window.name = "Larger"; 	break;
				}
			} else if (direction == "-") {
				switch (window.name) {
					case "Larger": 		window.name = "Large"; 		break;
					case "Large": 		window.name = "Default"; 	break;
					case "Default": 	window.name = "Small"; 		break;
					case "Small": 		window.name = "Smaller"; 	break;
					default: 			window.name = "Smaller"; 	break;
				}
			} else {
				window.name = "Default";
			}
			
			for (var i=0; i<document.styleSheets.length; i++) {
				if ((document.styleSheets[i].id==window.name)||(document.styleSheets[i].id=="")) {
					document.styleSheets[i].disabled = false;
				} else {
					document.styleSheets[i].disabled = true;
				}
			}

		}
