//alert("jbasics");
function btn_hover(obj) 	{obj.className="btn_hover"}
function btn_out(obj) 		{obj.className="btn"}
function btn_down(obj) 		{obj.className="btn_active"}
function btn_up(obj) 		{obj.className="btn"}
function btntop_hover(obj) 	{obj.className="btntop_hover"}
function btntop_out(obj) 	{obj.className="btntop"}
function btntop_down(obj) 	{obj.className="btntop_active"}
function btntop_up(obj) 	{obj.className="btntop"}

// BROWSERCHECKS
function checkbrowser() {
	agt       = navigator.userAgent.toLowerCase();
	//alert("checkbrowser" +agt)
	is_ie	  = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	is_opera  = (agt.indexOf("opera") != -1);
	is_mac	  = (agt.indexOf("mac")   != -1);
	is_safari = (agt.indexOf("safari")  != -1); // Safari
	is_mac_ie = (is_ie && is_mac);
	is_win_ie = (is_ie && !is_mac);
	is_gecko  = (navigator.product == "Gecko");
	is_mac_not_moz = (!is_gecko && is_mac);
	is_mac_moz= (is_gecko && is_mac);
	// loadeditor = 1;
	//alert("is_safari "+ is_safari)
	//alert("is_mac_not_moz "+ is_mac_not_moz)
	// alert("is_gecko "+ is_gecko)
	//alert("is_mac_ie "+ is_mac_ie)
}


function openNewWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}


function addevent(el, evname, func) {
	// alert("is_ie " + is_ie + " el: " + el + "   evname: " + evname + " func: " + func);
	if(el) {
		if (is_ie) el.attachEvent("on" + evname, func);
		else       el.addEventListener(evname, func, true);
	} else {
		if (is_ie) attachEvent("on" + evname, func); 			// geht nicht mit document.body
		else       addEventListener(evname, func, true);
	}
}

function hasClassName(el,thisClassName) {
	// report(el.nodeName)
	if (!el.className) return false;
	if (el.className == thisClassName || el.className.match(new RegExp("(^|\\s)" + thisClassName + "(\\s|$)"))) return true
}


function getCSSStyle(el,attribut) {   
	// alert ("el " + el.nodeName + " getCSSStyle " + attribut)
	// INPUT: attribut = "background-color", nicht Javascript Schreibweise "backgroundColor"
	if (window.getComputedStyle) { // Moz
		 attributVal = window.getComputedStyle(el,"").getPropertyValue(attribut);
	  } else if (el.currentStyle) { // IE
		 attributVal= el.currentStyle[attribut];
	}
	// Moz borderWidth Bug!
	if 	 	(attribut.indexOf('borderWidth')!=-1)  attributVal = getBorderWidth(el) // Anm) das kann man irgendwann verveinern, um auch unterschediliceh borderWidht zu erhalten
	else if (attribut.indexOf('border-width')!=-1) attributVal = getBorderWidth(el) // Anm) das kann man irgendwann verveinern, um auch unterschediliceh borderWidht zu erhalten
	// alert(attributVal)
	return attributVal;
}