var ns4 = true;
dObj = null;
var hStyle = '<span style="arial,helvetiva,sans-serif; font-size:10px; color:#888888;">';
var ds = new Array();
	ds[0] = 'powered by mediaBEAM';
	ds[1] = 'Erstellen Sie einen neuen webRUF';
	ds[2] = 'Informationen zur Bedienung';
	ds[3] = 'Die Allgemeinen Geschäftsbedingungen für webRUF';
	ds[4] = 'Informationen für Werbekunden';
	ds[5] = 'Copyright und Kontakt des Anbieters';
	ds[6] = 'Vorlagen auswählen';
	ds[7] = 'Einen neuen webRUF erstellen';
	ds[8] = 'Not set';
	ds[9] = 'Not set';

function initPage() {
	ns4 = (document.layers) ? true : false;
	dObj = (!ns4) ? document.getElementById("helpdiv") : document.layers["helpdiv"];
	preload();
	swapBack('new',0);
}

function swapIt(IID,descID) {
	if (!ns4) {
		document.getElementById(IID).src="img/btn_"+IID+"1.gif";
		} else {
		document.images[IID].src="img/btn_"+IID+"1.gif";
	}
	return true;
}

function swapBack(IID) {
	if (!ns4) {
		document.getElementById(IID).src="img/btn_"+IID+"0.gif";
	} else {
		document.images[IID].src="img/btn_"+IID+"0.gif";
	}
	return true;
}

function preload() {
  if (!document.images) return;
  var ia = new Array();
  	ia[0] = 'webruf'
  	ia[1] = 'hilfe'
  	ia[2] = 'bedingungen'
  	ia[3] = 'werbung'
  	ia[4] = 'impressum'
  	ia[5] = 'template'
  var arlen = ia.length;
  var imgA = new Array();
  var ImgPath = 'img/btn_'
	for (var i = 0; i<=arlen; i++) {
		imgA[i] = new Image();
		imgA[i].src = ImgPath + ia[i] + '1.gif';
	}
}

function formOn(fID) {
	if (!ns4) {
		document.images['fimg'+fID].src="img/form_on.gif";
	} else {
		document.images['fimg'+fID].src="img/form_on.gif";
	}
}

function formOff(fID) {
	if (!ns4) {
		document.images['fimg'+fID].src="img/form_off.gif";
	} else {
		document.images['fimg'+fID].src="img/form_off.gif";
	}
}

function callTemp() {
	var w = 252;
	var h = 400;
	
	if(typeof(cWin)!='object') {
		var cWin = window.open('temp.asp','vorlagen','height='+h+',width='+w+',personalbar=no,statusbar=no,status=no,toolbar=no');
		cWin.opener=self;
	}
	cWin.focus();
}

function countChars() {
	if (document.abfrage.grusstext.value.length > 250) {
	  document.abfrage.grusstext.value = document.abfrage.grusstext.value.substring(0,250)
	}
	document.abfrage.charcount.value =  250-document.abfrage.grusstext.value.length;
}