function hlp_open(root,act)
{
if(!window.hlp_win){
	window.open(root+'help/index.cfm?fuseaction='+act, "hlp_win", "toolbar=no,status=no,locationbar=no,directories=no,menubar=0,width=500,height=600,scrollbars=yes")
	}
else {
	window.hlp_win.location.href = root+"help/index.cfm?fuseaction="+act;
	window.hlp_win.location.focus();
	
}

}

function expert_open(root)
{
	if(!window.expert_win){
		window.open(root+'expertensystem/index.cfm', "expert_win", "toolbar=no,status=no,locationbar=no,directories=no,menubar=0,width=600,height=400,scrollbars=yes")
		}
	else {
		window.expert_win.location.href = root+"expertensystem/index.cfm";
		window.expert_win.location.focus();
	}
}

function change(name, src)
	{
		document[name].src = src;
	}


function check(title, path)

{
if (window.confirm("Wollen Sie wirklich '" + title + "' aus der Datenbank löschen?"))
{
location.href = path;
}
else
{}
}

function cart_popup(URL)
{
//var URL = '../shop/cart/index.cfm?fuseaction=popup';
var cart = window.open(URL,"cart","toolbar=no,status=no,location=0,directories=0,menubar=0,width=420,height=130,scrollbars=no");

	if(cart.closed == true) open(URL,"cart","toolbar=no,status=no,location=0,directories=0,menubar=0,width=420,height=130,scrollbars=no");
  else cart.focus();
}


function forgetpass(URL)
{
window.open(URL,'PW','height=200,width=430,menubar=no,statusbar=no,locationbar=no');
}

//checks if a string is well search-formated
//strForm: Form-name
//intIndexValue: position of input field
function validateForm_on_Spacer(strForm, intIndexValue)
{

	var strFormValue = document.forms[strForm].elements[intIndexValue].value;

if(strFormValue == "")
    {
     alert("Bitte einen Suchbegriff eingeben!");
     document.forms[strForm].elements[intIndexValue].focus();
     return false;
    }
   

//   if(strFormValue.indexOf(' ') != -1)
//    {
//     alert("Bitte keine Leerzeichen im Suchbegriff!");

//     document.forms[strForm].elements[intIndexValue].focus();
//     return false;
//   }
    
	
	if(strFormValue.search(/\W/) != -1 && strFormValue.search(/-/) == -1 && strFormValue.search(/ä/) == -1 && strFormValue.search(/Ä/) == -1 && strFormValue.search(/ö/) == -1 && strFormValue.search(/Ö/) == -1 && strFormValue.search(/ü/) == -1 && strFormValue.search(/Ü/) == -1 && strFormValue.search(/ß/) == -1 && strFormValue.search(/ /) == -1 && strFormValue.search(/&/) == -1 && strFormValue.search(/§/) == -1)
    {
     alert("Bitte keine Sonderzeichen im Suchbegriff!");

     document.forms[strForm].elements[intIndexValue].focus();
     return false;
    }

}




//checks if a string is well currency-formated
//strFormField: a list containing the fieldnames provided by the input-tag, seperated by commata
function chkCur(strFormField)
{

aryFormField = new Array();
aryFormField = strFormField.split(",");
var chkZ = 1;

for(ii=0;ii<aryFormField.length;++ii)
	{
	var strField = aryFormField[ii];
	
	   for(i=0;i<document.Formular.elements[strField].value.length;++i)
	     {
		 if((document.Formular.elements[strField].value.charAt(i) < "0"
	     || document.Formular.elements[strField].value.charAt(i) > "9")
		 && (document.Formular.elements[strField].value.charAt(i) != ","
		 && document.Formular.elements[strField].value.charAt(i) != "."))
	       chkZ = -1;
		}
	}
   if(chkZ == -1)
   {
     alert("Preiseigabe nicht korrekt! Mögliche Eingabe z.B.11,50.");
    return false;
    }
	return true;
}

function notEmty(frmName,FieldName)
{

	if(document.forms[frmName].elements[FieldName].value == "")
	{
		alert('Bitte das Feld nicht leer lassen.');
		return false;
	}
	if (document.forms[frmName].blnSearchAutorTitle.checked == false &&  document.forms[frmName].blnSearchToc.checked == false &&document.forms[frmName].blnSearchFulltext.checked == false)
	{
		alert('Bitte wählen Sie mindestens einen Suchbereich aus.');
		return false;
	}
	
}

function clearit(){
	if (document.frm_newsletter.newsletter.value == 'Ihre_Email@email.de'){
		document.frm_newsletter.newsletter.value = "";
		document.frm_newsletter.newsletter.focus();
	}

}



// funtion to download a book from small window which is splitted in frames now
function download(acsurl){

//parent.frames[1].location.href = acsurl;
setTimeout("parent.show.location.href = 'index.cfm?fuseaction=download_final'",5000);
}


function  check_VTSsearchBook(thisForm, thisError)
{
	 if  (thisForm.SearchString.value.length == 0) 
	{
		alert(thisError);
		return false;
	} else {
		//alert("suche ok");
		return true;
	}
}

function animation()
{
	document.getElementById("img_wait").style.display = "none";
	document.getElementById("img_wait2").style.display = "block";
	document.getElementById("text_wait").style.display = "block";
}


/* pfeil functions für easyslider_buch */
function $$(o){
	return document.getElementById(o);
}

function pfeil_rechts(){
	$$("pfeil_grau_links").style.display = "none";
	$$("pfeil_grau_rechts").style.display = "block";
	return true;
}

function pfeil_links(){
	$$("pfeil_grau_rechts").style.display = "none";
	$$("pfeil_grau_links").style.display = "block";
	return true;
}

