function TravelFinderSearchRequest ( form, params, aid ) {
	var src_file	 = "st/st_tf_ajax.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{

	case 'abmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&abm=set&id="+aid;
		break;
	case 'bookmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&bm=set";
		break;
	case 'searchmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&sm=set";
		break;
	case 'moveup':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&move=up&id="+aid;
		break;
	case 'movedown':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&move=down&id="+aid;
		break;
	case 'savesearch':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&ss=save&name="+aid;
		break;
	case 'deletesearch':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&ds=delete&id="+aid;
		break;

	case 'end':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=end";
		break;
	case 'begin':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=begin";
		break;

	case 'next':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=next";
		break;
	case 'prev':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=prev";
		break;
	case 'snext':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&spstep=next";
		break;
	case 'sprev':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&spstep=prev";
		break;
	case 'end2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=end2";
		break;
	case 'begin2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep=begin2";
		break;

	case 'next2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep2=next";
		break;
	case 'prev2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&pstep2=prev";
		break;
	case 'snext2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&spstep2=next";
		break;
	case 'sprev2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&spstep2=prev";
		break;
	case 'search':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&search=set";
		break;
	case 'detail':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&detail=set&id="+aid;
		break;
	case 'detail2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&detail2=set&id="+aid;
		break;
	case 'overview':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&overview=set";
		break;
	case 'overview2':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&overview2=set";
		break;
	default:
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize());
		break;
	}
	var func_param		= new Array ("formSubmit", form);
	document.tf_ajax.request_post(src_file, params,  tf_callback , func_param, false, false);
	return false;
}


	function openurl ( url, id ){

		if (id == null) {
			id = 'smavel_anbieter_link';
		}

		window.open(url,'smavel_anbieter_link'+id,'height=768,width=1024,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes');

	}


function changeloginvalues () {
	if (document.searchreg.seelogin.value == 'true') {
		document.vb_login.de_anbieter_suche_login.value = document.searchreg.de_anbieter_suche.value;
		document.vb_login.searchhash_login.value = document.searchreg.searchhash.value;
	}
}


function tf_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						visibleLoading('stop');
						document.getElementById('output1').innerHTML = rest;
						setTimeout("changeloginvalues()",3000);
			}
			}
		} else {
			//alert("suche hashen");
		}
}

function InfoBoxRequest ( form, params, aid ) {
	var src_file	 = "st/st_ib.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{

	case 'abmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&abm=set&id="+aid;
		break;


	case 'moveupfav':
		setTimeout("callmysmavel()",500);
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&movefav=up&id="+aid;
		break;
	case 'movedownfav':
		setTimeout("callmysmavel()",500);
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&movefav=down&id="+aid;
		break;

	case 'deletefav':
		setTimeout("callmysmavel()",500);
		nd();
		nd();
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&dsfav=delete&id="+aid;
		break;

	case 'bookmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&bm=set";
		break;
	case 'searchmark':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&sm=set";
		break;
	case 'moveup':
		setTimeout("callmysmavel()",500);
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&move=up&id="+aid;
		break;
	case 'movedown':
		setTimeout("callmysmavel()",500);
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&move=down&id="+aid;
		break;
	case 'savesearch':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&ss=save&name="+aid;
		break;
	case 'deletesearch':
		setTimeout("callmysmavel()",500);
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&ds=delete&id="+aid;
		break;
	default:
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize());
		break;
	}
	var func_param		= new Array ("formSubmit", form);
	document.ib_ajax.request_post(src_file, params,  ib_callback , func_param, false, false);
	return false;
}

function InfoBoxBookmark ( params, aid ) {
	var src_file	 = "st/st_ib.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{
	case 'abmark':
		var params			= "?task=formSubmit&abm=set&id="+aid;
		break;
	default:
		var params			= "?task=formSubmit";
		break;
	}
	var func_param		= new Array ("formSubmit");
	document.ib_ajax.request_post(src_file, params,  ib_callback , func_param, false, false);
	return false;
}




function ib_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('infobox1').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


function SearchPagination ( form, params ) {
	var src_file	 = "st_ms.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{
	case 'start':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=start&ajax=set";
		break;
	case 'end':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=end&ajax=set";
		break;
	case 'next':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=next&ajax=set";
		break;
	case 'prev':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=prev&ajax=set";
		break;
	default:
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize());
		break;
	}
	var func_param		= new Array ("formSubmit", form);
	document.ms_ajax.request_post(src_file, params,  ms_callback , func_param, false, false);
	return false;
}


function ms_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('sea_ex').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


function FavoritenPagination ( form, params ) {
	var src_file	 = "st_ms.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{
	case 'start':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=fstart&ajax=set";
		break;
	case 'end':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=fend&ajax=set";
		break;
	case 'next':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=fnext&ajax=set";
		break;
	case 'prev':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=fprev&ajax=set";
		break;
	default:
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize());
		break;
	}
	var func_param		= new Array ("formSubmit", form);
	document.fa_ajax.request_post(src_file, params,  fa_callback , func_param, false, false);
	return false;
}


function fa_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('fav_ex').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}



function SaveSearch ( form, params, aid ) {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{
	case 'savesearch':
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize())+"&action=save&name="+aid;
		break;
	default:
		var params			= "?task=formSubmit&value="+encodeURIComponent($(form).serialize());
		break;
	}
	var func_param		= new Array ("formSubmit", form);
	document.ss_ajax.request_post(src_file, params,  ss_callback , func_param, false, false);
	return false;
}


function ss_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('infobox1').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


function savesearch ( ) {
 var sname = document.getElementById('savesearchname').value;
 var stext = document.getElementById('savesearchtext').value;

  if (sname.length <= 2 ) {
    alert("Bitte geben Sie mindestens drei Buchstaben an.");
  } else {
     var ssinput = sname +"="+ stext;
     //alert(encodeURIComponent(ssinput));
     nd();
     nd();
     return SaveSearch('tfem', 'savesearch', encodeURIComponent(ssinput));
  }
	
}

function updatesearch ( idtoupdate ) {
 var sname = document.getElementById('savesearchname').value;
 var stext = document.getElementById('savesearchtext').value;

  if (sname.length <= 2 ) {
    alert("Bitte geben Sie mindestens drei Buchstaben an.");
  } else {
     var ssinput = sname +"="+ stext;
     //alert(encodeURIComponent(ssinput));
     nd();
     nd();
     return UpdateSearch( 'savesearch', encodeURIComponent(ssinput), idtoupdate);
  }
	
}

function UpdateSearch (  params, aid, sid ) {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	switch (params)
	{
	case 'savesearch':
		var params			= "?task=formSubmit&action=updatesearch&name="+aid+"&idtoupdate="+sid;
		break;
	default:
		var params			= "?task=formSubmit";
		break;
	}
	var func_param		= new Array ("formSubmit");
	document.us_ajax.request_post(src_file, params,  us_callback , func_param, false, false);
	setTimeout("callmysmavel()",500);
	return false;
}


function us_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('infobox1').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


//checbox session update
function checkboxSession ( checker, provid, liste ) {

	if (liste == 1)	{
		if(document.getElementById('prcheckbox'+checker).checked ) {
			var state=1;
		} else {
			var state=0;
		}
	} else {
		if(document.getElementById('2prcheckbox'+checker).checked) {
			var state=1;
		} else {
			var state=0;
		}
	}


	var src_file	 = "st/st_tf_cb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	var params			= "?task=formSubmit&provid="+provid+"&liste="+liste+"&state="+state;
	var func_param		= new Array ("formSubmit");
	document.cb_ajax.request_post(src_file, params,  cb_callback , func_param, false, false);
	return false;
}


function cb_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
					break;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


 function submitcheck () {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;

	// funktlist
	var psize = document.getElementById('psize').value;
	var pstep = document.getElementById('pstep').value;
	

	if (psize - pstep >= 7) {
		var	amount = 8;
	} else {
		pstep = (pstep % 8);
		psize = (psize % 8);
		var amount = ((psize - pstep) +1);
	}

	var prchboxstr = "";
 	var prcheckbox=new Array();
	for (var i = 0; i < amount; i++) {
		prcheckbox[i] = document.getElementById("prcheckbox"+i).checked;
		//prchboxstr += document.getElementById("prcheckbox"+i).checked;

	}
	

	var idchboxstr = "";
	var idcheckbox = new Array();
	for (var i = 0; i < amount; i++) {
		idcheckbox[i] = document.getElementById("idcheckbox"+i).value;
		//idchboxstr +=  document.getElementById("idcheckbox"+i).value;
	}
	var foption = document.getElementById('funktlist').selectedIndex;

	var j = 0;
	var finalidsstr = "";
	var finalids = new Array();
	for (var i = 0; i < amount; i++) {
		if (prcheckbox[i])
		{
			finalids[j] = idcheckbox[i];
			finalidsstr += idcheckbox[i]+"_";
			j++;
		}
	}


	var provarr1 = document.getElementById('complet_prov').value;
	provarr1 = provarr1.substring((provarr1.length - 1) , 0);

	finalidsstr = finalidsstr.substring( (finalidsstr.length - 1) , 0);
	//alert(finalidsstr);
	
	//alert("|"+foption+"|");

	if (finalidsstr == '' && foption != 0) {
		AlertChoise('Sie haben keinen Anbieter ausgewählt!', 'Smavel Info Fenster', 300, false);
	} else {
		switch (foption)
		{
			//favoriten
			case 3:
				//alert('recommend');
				var params			= "?task=formSubmit&action=recommend";
				window.open("st/st_tf_sb.php?action=recommend&items="+finalidsstr,'smavel_recommend','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');
				break;
			case 2:
				var params			= "?task=formSubmit&action=multifavadd&items="+finalidsstr;
				var func_param		= new Array ("formSubmit");
				document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
				//alert('favoriten');
				break;
			case 1:
				//alert(finalidsstr);
				var params			= "?task=formSubmit&action=print";
				window.open("st/st_pr.php?action=print&items="+finalidsstr,'smavel_print','height=570,width=1016,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no');
				break;
			case 0:
				//alert('print');
				//AlertChoise('Sie haben keinen Aktion ausgewählt!', 'Smavel Info Fenster', 300, false);
				//alert('recommend');
				var formman = 'tfem';

				//window.open("st/st_in_pro.php?action=inquire&liste=check1&provider="+provarr1+"&valr="+encodeURIComponent($(formman).serialize()),'smavel_inquire','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');				
				checkParticipation(provarr1, encodeURIComponent($(formman).serialize()));
				break;
			default:
				//alert('wiso nichts');
				var params			= "?task=formSubmit";
				break;
		}
	}
 //var func_param		= new Array ("formSubmit", form);
 //	var func_param		= new Array ("formSubmit");
 //	document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
	return false;
 }


//check if selection paticipates
function checkParticipation ( provicerarr, serialform ) {

	var src_file	 = "st/st_tf_cp.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	var params			= "?task=formSubmit&liste=check1&provarr="+provicerarr+"&serialform="+serialform;
	var func_param		= new Array ("formSubmit");
	document.cp_ajax.request_post(src_file, params,  cp_callback , func_param, false, false);
	return false;
}


function cp_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
				

					var switchit = rest.split("[#]");
				
					if(switchit[0] == '1'){
						window.open("st/st_in_pro.php?action=inquire&liste=check1&provider="+switchit[1]+"&valr="+encodeURIComponent(switchit[2]),'smavel_inquire','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');				
					} else {
						AlertChoise('/st/st_tf_cp.php?nopart=true', 'Smavel Info Fenster', 300, true);
					}

					//window.open("st/st_in_pro.php?action=inquire&liste=check1&provider="+provarr1+"&valr="+encodeURIComponent($(formman).serialize()),'smavel_inquire','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');				

					break;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}



function submitcheck2 () {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;

	// funktlist
	var psize = document.getElementById('psize2').value;
	var pstep = document.getElementById('pstep2').value;
	

	if (psize - pstep >= 7) {
		var	amount = 8;
	} else {
		pstep = (pstep % 8);
		psize = (psize % 8);
		var amount = ((psize - pstep) +1);
	}

	var prchboxstr = "";
 	var prcheckbox=new Array();
	for (var i = 0; i < amount; i++) {
		prcheckbox[i] = document.getElementById("2prcheckbox"+i).checked;
		//prchboxstr += document.getElementById("prcheckbox"+i).checked;

	}
	

	var idchboxstr = "";
	var idcheckbox = new Array();
	for (var i = 0; i < amount; i++) {
		idcheckbox[i] = document.getElementById("2idcheckbox"+i).value;
		//idchboxstr +=  document.getElementById("idcheckbox"+i).value;
	}
	var foption = document.getElementById('funktlist2').selectedIndex;

	var j = 0;
	var finalidsstr = "";
	var finalids = new Array();
	for (var i = 0; i < amount; i++) {
		if (prcheckbox[i])
		{
			finalids[j] = idcheckbox[i];
			finalidsstr += idcheckbox[i]+"-";
			j++;
		}
	}

	var provarr2 = document.getElementById('complet_prov2').value;
	provarr2 = provarr2.substring((provarr2.length - 1) , 0);

	finalidsstr = finalidsstr.substring( (finalidsstr.length - 1) , 0);
	//alert(finalidsstr);
	
//	alert("|"+foption+"|");

	switch (foption)
	{
		//favoriten
		case 3:
			//alert('recommend');
			var params			= "?task=formSubmit&action=recommend";
			window.open("st/st_tf_sb.php?action=recommend&items="+finalidsstr,'smavel_recommend','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');
			break;
		case 2:
			var params			= "?task=formSubmit&action=multifavadd&items="+finalidsstr;
			var func_param		= new Array ("formSubmit");
			document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
			//alert('favoriten');
			break;
		case 1:
			//alert('print');
			var params			= "?task=formSubmit&action=print";
			window.open("st/st_pr.php?action=print&items="+finalidsstr,'smavel_print','height=570,width=1016,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');
			break;
		case 0:
			//alert('print');
				var formman = 'tfem';
				window.open("st/st_in_pro.php?action=inquire&liste=check2&provider="+provarr2+"&valr="+encodeURIComponent($(formman).serialize()),'smavel_inquire','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');				
				break;
		default:
			//alert('wiso nichts');
			var params			= "?task=formSubmit";
			break;
	}
 //var func_param		= new Array ("formSubmit", form);
 //	var func_param		= new Array ("formSubmit");
 //	document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
	return false;
 }

 function favcheck () {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;

	// funktlist
	var psize = document.getElementById('psize').value;
	var pstep = document.getElementById('pstep').value;
	

	if (psize - pstep >= 9) {
		var	amount = 10;
	} else {
		pstep = (pstep % 10);
		psize = (psize % 10);
		var amount = ((psize - pstep) +1);
	}

	var prchboxstr = "";
 	var prcheckbox=new Array();
	for (var i = 0; i < amount; i++) {
		prcheckbox[i] = document.getElementById("facheckbox"+i).checked;
		//prchboxstr += document.getElementById("prcheckbox"+i).checked;

	}
	

	var idchboxstr = "";
	var idcheckbox = new Array();
	for (var i = 0; i < amount; i++) {
		idcheckbox[i] = document.getElementById("faidcheckbox"+i).value;
		//idchboxstr +=  document.getElementById("idcheckbox"+i).value;
	}
	var foption = document.getElementById('funktlist').selectedIndex;

	var j = 0;
	var finalidsstr = "";
	var finalids = new Array();
	for (var i = 0; i < amount; i++) {
		if (prcheckbox[i])
		{
			finalids[j] = idcheckbox[i];
			finalidsstr += idcheckbox[i]+"-";
			j++;
		}
	}

	finalidsstr = finalidsstr.substring( (finalidsstr.length - 1) , 0);
	//alert(finalidsstr);
	
//	alert("|"+foption+"|");

	switch (foption)
	{
		//favoriten
		case 3:
			//alert('recommend');
			var params			= "?task=formSubmit&action=recommend";
			window.open("st/st_tf_sb.php?action=recommend&items="+finalidsstr,'smavel_recommend','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');
			break;
		case 2:
			//löschen
			setTimeout("callmysmavel()",500);
			//alert(finalidsstr);
			var params			= "?task=formSubmit&action=multifavrm&items="+finalidsstr;
			var func_param		= new Array ("formSubmit");
			document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
			//alert('favoriten');
			break;
		case 1:
			//alert('print');
			var params			= "?task=formSubmit&action=print";
			window.open("st/st_pr.php?task=formSubmit&action=print&items="+finalidsstr,'smavel_print','height=570,width=1016,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no');
			//window.open("st/st_pr.php",'smavel_print','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');
			break;
		case 0:
			//alert('print');
			var params			= "?task=formSubmit&action=none";
			break;
		default:
			//alert('wiso nichts');
			var params			= "?task=formSubmit";
			break;
	}
 //var func_param		= new Array ("formSubmit", form);
 //	var func_param		= new Array ("formSubmit");
 //	document.sb_ajax.request_post(src_file, params,  sb_callback , func_param, false, false);
	return false;
 }


function sb_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
					//alert('erfolg!!!');		
					document.getElementById('infobox1').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}

function openid ( tab, idtoload){

	window.open("st/st_pr.php?tab=" + tab + "&pr=" + idtoload,'smavel_anbieter_information','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');

}

function openrecid ( idtoload){
	window.open("st/st_tf_sb.php?action=recommend&items="+idtoload,'smavel_recommend','height=570,width=602,resizable=yes,scrollbars=no,status=yes,toolbar=no,menubar=no,location=no');

}

function openprint (finalidsstr){
	window.open("st/st_pr.php?action=print&items="+finalidsstr,'smavel_print','height=570,width=1016,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no');
}


 function delcheck () {
	var src_file	 = "st/st_tf_sb.php";
	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;

	// funktlist
	var psize = document.getElementById('spsize').value;
	var pstep = document.getElementById('spstep').value;
	

	if (psize - pstep >= 9) {
		var	amount = 10;
	} else {
		pstep = (pstep % 10);
		psize = (psize % 10);
		var amount = ((psize - pstep) +1);
	}

	var prchboxstr = "";
 	var prcheckbox=new Array();
	for (var i = 0; i < amount; i++) {
		prcheckbox[i] = document.getElementById("mscheckbox"+i).checked;
		//prchboxstr += document.getElementById("prcheckbox"+i).checked;

	}
	

	var idchboxstr = "";
	var idcheckbox = new Array();
	for (var i = 0; i < amount; i++) {
		idcheckbox[i] = document.getElementById("idcheckbox"+i).value;
		//idchboxstr +=  document.getElementById("idcheckbox"+i).value;
	}
	
	var j = 0;
	var finalidsstr = "";
	var finalids = new Array();
	for (var i = 0; i < amount; i++) {
		if (prcheckbox[i])
		{
			finalids[j] = idcheckbox[i];
			finalidsstr += idcheckbox[i]+"-";
			j++;
		}
	}

	finalidsstr = finalidsstr.substring( (finalidsstr.length - 1) , 0);
	//alert(finalidsstr);
	
//	alert("|"+foption+"|");
//alert(finalidsstr);
	var foption = document.getElementById('funktlists').selectedIndex;

	if (foption == 1)
			
	{		
			
			var params			= "?task=formSubmit&action=multisdel&items="+finalidsstr;
			var func_param		= new Array ("formSubmit");
			document.ds_ajax.request_post(src_file, params,  ds_callback , func_param, false, false);
	}



	setTimeout("callmysmavel()",500);
	
	return false;
 }


function ds_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
					//alert('erfolg!!!');		
					document.getElementById('infobox1').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}

function callmysmavel ( ) {
	var src_file	 = "st_ms.php?ajax=set";
	
		if (document.getElementById('fav_ex').style.display == 'block')
		{
			var exp = 'fav';
		}

		if (document.getElementById('sea_ex').style.display == 'block')
		{
			var exp = 'search';
		}

		if (document.getElementById('pro_ex').style.display == 'block')
		{
			var exp = 'config';
		}


		if (document.getElementById('req_ex').style.display == 'block')
		{
			var exp = 'req';
		}
	//alert(exp);

	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	var params			= "?answer=ajax&exp="+exp;
	var func_param		= new Array ("formSubmit");
	document.cm_ajax.request_post(src_file, params,  cm_callback , func_param, false, false);
	return false;
}


function cm_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				switch (params[0]) {
				case "formSubmit":
						document.getElementById('mysmavel').innerHTML = rest;
			}
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}




function ittval ( idto ) {


	var src_file	 = "st/st_pr_ajax.php";


	if (document.relative_path)
	var	src_file		 = document.relative_path + src_file;
	var params			= "?itterate=ajax&id="+idto;
	var func_param		= new Array ("formSubmit");
	document.it_ajax.request_post(src_file, params,  it_callback , func_param, false, false);
	return false;
}


function it_callback (answer, params)	{
		if (answer) {
			var first_space	= answer.indexOf(" ");
			var splittet	= new Array (answer.substring(0, first_space), answer.substring(first_space+1));
			var status		= splittet[0];
			var rest		= splittet[1];

			if (status == "ERROR") {
				alert(rest);
			} else if (status == "SUCCESSFUL") {
				
			}
		} else {
			alert("Unbekannter Fehler!");
		}
}


function notlogedin () {
	AlertChoise('/st/st_regbox.php', 'Smavel Info Fenster', 300, true);


	//if (confirm('Um den vollen Funktionsumfang von smavel nutzen zu können müssen Sie sich anmelden, bzw registrieren. Wollen sie sich jetzt registrieren ?')) {
		//location.href='http://www.smavel.com/forum/de/register.php'; 
	//	document.searchreg.submit();
	//} else { 
	//	return false;
	//}

}

document.tf_ajax		= new Ajax(5);
document.ib_ajax		= new Ajax(5);
document.ms_ajax		= new Ajax(5);
document.fa_ajax		= new Ajax(5);
document.sb_ajax		= new Ajax(5);
document.ss_ajax		= new Ajax(5);
document.us_ajax		= new Ajax(5);
document.ds_ajax		= new Ajax(5);
document.cm_ajax		= new Ajax(5);
document.it_ajax		= new Ajax(5);
document.cb_ajax		= new Ajax(5);
document.cp_ajax		= new Ajax(5);