//#######################################################
//-------------------------------------------------------
//-----------------NEOLOG WEBMASTER TOOL-----------------
//-------------------------------------------------------
//#######################################################
//-------------------------------------------------------
//Editscripts v1.0 by Webdesign-Giese--------------------
//www.webdesign-giese.de---------------------------------
//-------------------------------------------------------
//#######################################################

var tx = new Array();
var sepe = "&";
var tmpc = "000000";

function aktualisiere(initfocus){
	if (initfocus==1) document.forma.vgf.focus();
	
	var loc = "http://www.neologstore.com/webmastertool/?";
	tx[0] = "<iframe src=\"";
	tx[2] = "\" width=\"";
	tx[4] = "\" height=\"";
	tx[6] = "\" name=\"neolog\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" scrolling=\"no\"></iframe>";

	with (document) {
		var sicht;
		if (forma.dzahlen[0].checked == true){
			_za="1";
			sicht="visible";
		} else {
			_za="0";
			sicht="hidden";
		}
		getElementById("sichtba").style.visibility=sicht;
		getElementById("sichtbb").style.visibility=sicht;
		//var _za =(forma.dzahlen[0].checked)?"1":"0";
		//alert(_za);
		//var _za =(zahlen.checked==true)?"1":"0";
		var _bl =(forma.blink.checked==true)?"1":"0";
		var _vgf = forma.vgf.value;
		var _hgf = forma.hgf.value;
		var _gr = forma.groesse.value;
	}
	tx[1] = loc+_vgf+sepe+_hgf+sepe+_za+sepe+_bl+sepe+_gr;
	switch (_gr) {
		case "0":tx[3]=70;tx[5]=80;break;
		case "1":tx[3]=100;tx[5]=120;break;
		case "2":tx[3]=140;tx[5]=160;break;
	}
	if (_za == "1") tx[5] += 20 + (2*_gr);;
	var _xtx = tx.join("");
	document.forma.ergebnis.value=_xtx;
	//document.getElementById("vorschau").style.backgroundColor='#'+_hgf;
	//document.getElementById("vorschau").style.width=tx[3]+'px';
	//document.getElementById("vorschau").style.height=tx[5]+'px';
	//top.neolog.location.replace(tx[1]);
	//top.neolog.location.refresh();
	//document.getElementById('neolog').height=tx[5];
	//document.getElementById('neolog').width=tx[3];
	document.getElementById('vorschau').innerHTML=_xtx;
	
}

function checkCol(_k) {
	var _ss = _k.value
	var _t = _ss.search(/[^0-9a-fA-F]/);
	//alert(_t);
	if (_t != -1 || _ss.length !=6) {
		alert("Error, wrong format! Please use Hex.");
		_k.value = tmpc;
	} else {
		aktualisiere();
	}
}

function merke(xw){
	tmpc = xw.value;
}
