/*******************************************************************
 *   Copyright (C)    Singer Technical Consulting GmbH             *
 *                    Christina Rankers                            *
 *   http://www.singer-tc.de                                       *
 *******************************************************************/


var dhtmlObj, dhtmlIn, dhtmlOut, styleObj, widthObj, heightObj, bgColorObj;

function getObj(){
	if (document.layers) {
		dhtmlObj = "document.layers";
		dhtmlIn = "[";
		dhtmlOut = "]";
		styleObj = "";
		widthObj = ".clip.width";
		heightObj = ".clip.height";
		bgColorObj = ".bgColor";
	}
	if (document.all) {
		dhtmlObj = "document.all";
		dhtmlIn = "[";
		dhtmlOut = "]";
		styleObj = ".style";
		widthObj = ".offsetWidth";
		heightObj = ".offsetHeight";
		bgColorObj = ".backgroundColor";
	}
	if (document.getElementById) {
		dhtmlObj = "document.getElementById";
		dhtmlIn = "(";
		dhtmlOut = ")";
		styleObj = ".style";
		widthObj = ".offsetWidth";
		heightObj = ".offsetHeight";
		bgColorObj = ".backgroundColor";
	}

}

function rollOver() {
	if(document.images){
		Obj = document.images[arguments[0]];
		type = Obj.src.substring(Obj.src.lastIndexOf('.'));
		Obj.src = Obj.src.substring(0, Obj.src.length-4) + "_hi" + type;
	}
}

function rollOut() {
	if(document.images) {
		Obj = document.images[arguments[0]];
		type = Obj.src.substring(Obj.src.lastIndexOf('.'));
		Obj.src = Obj.src.substring(0, Obj.src.length-7) + type;
	}
}

function setColor(object, color) {
	if (thisStyleObj(object)) {
		thisStyleObj(object).background = color;
	}
}

function thisStyleObj(name){
	return eval(dhtmlObj + dhtmlIn + '"' + name + '"'+ dhtmlOut + styleObj);
}

function getButtonHTML(path, color1, color2, submit, href) {
	strHTML = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	strHTML += "<tr>";
	strHTML += "<td bgcolor=\"#" + color2 + "\" colspan=\"3\"><img src=\"" + path + "pics/trans.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\"></td>";
	strHTML += "</tr>";
	strHTML += "<tr>";
	strHTML += "<td bgcolor=\"#" + color2 + "\" width=\"1\"><img src=\"" + path + "pics/trans.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\"></td>";
	strHTML += "<td bgcolor=\"#" + color1 + "\"><a href=\"" + href + "\" class=\"submit\"><font color=\"#" + color2 + "\">&nbsp;" + submit + "&nbsp;</font></a></td>";
	strHTML += "<td bgcolor=\"#" + color2 + "\" width=\"1\"><img src=\"" + path + "pics/trans.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\"></td>";
	strHTML += "</tr>";
	strHTML += "<tr>";
	strHTML += "<td bgcolor=\"#" + color2 + "\" colspan=\"3\"><img src=\"" + path + "pics/trans.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\"></td>";
	strHTML += "</tr>";
	strHTML += "</table>";
	return strHTML;
}