/**
 * /**
 * Informations:
 * Copyright 2009 by visart.de
 * @author: Michael Anders, info@cm-system.net - http://www.cm-system.net
 * @author: René Simon, rene.simon@visart.eu
 */

function FuncPageRequest(url,params,method) {
	//alert('URL:'+url+'\nPrams:'+params+'\nMethode:'+methode);
	var xmlHttpReq = false;
	
	if (window.XMLHttpRequest) {
	    xmlHttpReq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
	    xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if(method== "GET") {
		url = url+"?"+params;
		document.location.href = url;
		return true;
	}
	xmlHttpReq.open(method, url, true);
	xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
	xmlHttpReq.setRequestHeader("Content-length", params.length);
	xmlHttpReq.setRequestHeader("Connection", "close");
	xmlHttpReq.onreadystatechange = function(){//Call a function when the state changes.
		if (xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200) {
			document.location.href = url;
		}
	}
	xmlHttpReq.send(params);
}

function FuncCleanResultSwitch(site) {
	FuncFadeOutBlock('searchCategorieResultContainer');
	xajax_funcLiveGetBlockmaschineResultSet(site);
}

function FuncJumpToAnker(anker) {
	window.location.hash = anker;
}