ROOT_FILE_NAME = "http://pkw-ankauf.de/index.php";

IE = (document.all); // Internet Explorer
NC = (document.layers); // Netscape
Opera = (document.getElementById); // Opera

function getHeight() { 
if (IE || Opera) send = document.body.clientHeight;
if (NC) send = window.innerHeight;
return send;
}

function getWidth() { 
if (IE || Opera) send = document.body.clientWidth;
if (NC) send = window.innerWidth;
return send;
}

function show_error(errText, fieldName){
	if(errText==null || errText=="") errText = "Ihre Angaben sind unvollst&auml;ndig. Bitte &uuml;berpr&uuml;fen Sie die mit Rot markierte Felder!";
	document.getElementById('fehler_meldung').innerHTML=errText;
	document.getElementById('fehler_meldung').style.visibility='visible';
	if(fieldName!=null || fieldName!="") eval("document.getElementById('label_"+fieldName+"').className = 'text_fehler'");
}

function hide_error(){
	var labels=document.getElementsByTagName("span");	
	
	document.getElementById('fehler_meldung').style.visibility='hidden';
	for(i=0; i < labels.length; i++) if(eval('labels['+i+'].id.substr(0,5)')=='label') eval("labels["+i+"].className='text'");
}

function goTo(URL, target){
	if(target==null) target='parent';
	if(navigator.appName=="Netscape") eval('window.'+target+'.location = "'+URL+'"');
	else eval('window.'+target+'.navigate("'+URL+'")');
}

function popUpWindow(URLStr, left, top, width, height)
{
  window.open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function PopMessage(text,width){
var layer=document.getElementById('waitmessage');

	layer.innerHTML=text;
	layer.style.width=width;
	layer.style.top=(document.body.clientHeight-(layer.style.height))/2-50;
	layer.style.left=(document.body.clientWidth-width)/2;	
	layer.style.visibility='visible';
}

function HidePopMessage(){
document.getElementById('waitmessage').style.visibility='hidden';
}

function popUpWindow(URLStr, left, top, width, height)
{
  if(left==-1) left=(document.body.clientWidth-width)/2;
  window.open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
