function deactivateImage(aListStr,aHiddenId){
	var aImageList = aListStr.split("++++");str =aListStr
	for (i=0;i<aImageList.length;i++){
		str += aImageList[i]+'<br/>'
		//$(aImageList[i]).style.borderColor = "#ddd"
		if($(aImageList[i])){
			$(aImageList[i]).style.opacity = 0.3;
			$(aImageList[i]).style.filter = 'alpha(opacity=30)';// = 0.4;
		}
	}
	showIt(aHiddenId);
	new Ajax.Request(ajaxSiteUrl,{method: 'post',parameters: 'ajaxRequest=deactivate,' +  aListStr +','+ myName+','+ controll,onSuccess: function(transport){//Funktion geht nur bei login
			aAr=transport.responseText;
			printat("debug",aAr);
	}});
}
function activateImage(aListStr,aHiddenId){
	var aImageList = aListStr.split("++++");str =aListStr
	for (i=0;i<aImageList.length;i++){
		str += aImageList[i]+'<br/>'
		//$(aImageList[i]).style.borderColor = "rgb(221, 221, 221)"
		if($(aImageList[i])){
			$(aImageList[i]).style.opacity = 1;
			$(aImageList[i]).style.filter = 'alpha(opacity=100)';// = 0.4;
		}
	}
	showIt(aHiddenId);
	new Ajax.Request(ajaxSiteUrl,{method: 'post',parameters: 'ajaxRequest=activate,' +  aListStr +','+ myName+','+ controll,onSuccess: function(transport){//Funktion geht nur bei login
			aAr=transport.responseText;
			//printat("content",aAr+aHiddenId);
	}});
}
function deleteImage(aListStr){
	//printat("debug",'ajaxRequest=delete,' +  aListStr +','+ myName+','+ controll + ' '+ajaxSiteUrl);
	new Ajax.Request(ajaxSiteUrl,{method: 'post',parameters: 'ajaxRequest=delete,' +  aListStr +','+ myName+','+ controll,onSuccess: function(transport){//Funktion geht nur bei login
			aAr=transport.responseText;
			//printat("content",aAr);
			
			//printat("debug",transport.responseText);
	
			
			
	location.reload();//
		
	}});
}

function parseCookie()
{
	var aCookie = document.cookie;
	var cookieList = aCookie.split(";");
	aCookie = new Array();
	for(var i = 0; i < cookieList.length; i++)
	{
		var name = cookieList[i].split("=");
		aCookie[unescape(name[0])]= unescape(name[1]);
	}
	//return aCookie;
	//printat("debug",aCookie);
}

function getMyName(){
	str=document.cookie.split(';');
	var found = -1
	for (i=0;i<str.length;i++){
			test = str[i].indexOf(myName);
			if (test==1){found = i}
		}
	a=str+'<br/>'+str[found]
	printat("debug",a);
	id='';
	if (found){id = str[found].split('=')}
	return unescape(id[0]).substr(1);
}
function search (searchStr){
	//parseCookie();
	//id = getMyName();
	
	//printat("debug",location.host+location.pathname);
	ziel= location.pathname + '?search='+searchStr;
	window.location.href = ziel;
	return
	
	
	
	if (id){	
		//printat("debug",id);
		new Ajax.Request(ajaxSiteUrl,{method: 'post',parameters: 'search=' +  searchStr  + ',' + myName + ',' + user+','+ lang+','+id,onSuccess: function(transport){
			hideIt('slider')
			aAr=transport.responseText.split('+++++');
			printat("content",aAr[0]);
			if (aAr[1]){
				printat("sliderImages0",aAr[1]);
				$("sliderImages0").style.height = aAr[4] +"px"; 
				$("track0").style.height = aAr[5] +"px"; 
				$("wrap0").style.height = aAr[6] +"px"; 
				$(slider0).values=0;
				showIt('slider')
			}
			printat("pathMyName",aAr[2])//Headline
			getMax();
			//printat("pathMyName",aAr[7])//Headline
			printat("pathSearch",'')
		}});
	}
}
function showLastSearch(){
	ziel= location.pathname + '?lastSearch='+true;
	window.location.href = ziel;
	return
	
	
	
	id = getMyName();
	if (id){	new Ajax.Request(ajaxSiteUrl,{method: 'post',parameters: 'lastSearch=' +   'true,' + myName+','+ user+','+ lang+','+id,onSuccess: function(transport){
		hideIt('slider')
		aAr=transport.responseText.split('+++++');
		printat("content",aAr[0]);
		if (aAr[1]){printat("slider",aAr[1]);showIt('slider')
		}
		printat("pathMyName",aAr[2])
		printat("pathSearch",'')
		}});
	}
}
function getMax(){
	//printat("pathMyName",$(slider0).maximum)//Headline
	printat("pathMyName",$(slider0).increment+$(slider0).range+$(slider0).step+$(slider0).values)//Headline
}

