/* PressTIC 2006 Nawer */

/**************** Matoumba App *****************************/
	var wal = new Object();

	wal.opencat = function(hash) {
		params = 'mode=opencat';
		params += '&hash='+hash;
		sys.Net.ReqPOST('/walos.php?',params,wal.dispcat);
	}

	wal.dispcat = function(html) {
		var hashing = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
		var bloccat = document.getElementById('listing_'+hashing);
		
		bloccat.innerHTML = html;
	}
	
	wal.suggestitem = function(hash) {
	    var blocsuggest = document.getElementById('listing_'+hash);
	    wal.disploading(blocsuggest);
		params = 'mode=suggestitem';
		params += '&item='+hash;
		sys.Net.ReqPOST('/walos.php?',params,wal.dispsuggest);
	}

	wal.dispsuggest = function(html) {
		var hashing = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
		var bloccat = document.getElementById('listing_'+hashing);
		if(!bloccat) {
		 	alert("Erreur Serveur");
		}
		bloccat.innerHTML = html;
	}
	
	wal.refreshmyvotehisto = function() {
		params = 'mode=refreshmyhisto';
		sys.Net.ReqPOST('/walos.php?',params,wal.refreshmyvotehistorecieve);
	}

	wal.refreshmyvotehistorecieve = function(html) {
		var blocmyvotehisto = document.getElementById('menuright_histo');
		if(!blocmyvotehisto) return;
		blocmyvotehisto.innerHTML = html;
	}
	
	wal.markiteminterest = function(hash,id,interest) {
		var bloc_vote = document.getElementById('bloc_vote_'+hash);
		var news_header = document.getElementById('news_header_'+hash);
		var news_content = document.getElementById('news_content_'+hash);
		var isr = bloc_vote.getAttribute('isr');
		if(!isr || isr != '0')return;
		if(interest == "1"){
		 	var curnote = bloc_vote.getAttribute('myvote');
			var newvote = parseInt(curnote)+1;
		 	bloc_vote.className = 'news_header_vote_all_off' ;
		 	bloc_vote.innerHTML = newvote;
		 	if(news_header){
			 	news_header.className = 'news_header_off';
			 	news_content.className = 'news_content_off';
			}
		}
		if(interest == "0"){
		 	bloc_vote.className = 'news_header_vote_all_down' ;
		 	bloc_vote.innerHTML = '';
		 	if(news_header){
			 	news_header.className = 'news_header_off3';
			 	news_content.className = 'news_content_off3';
			}
		}

		var params = 'mode=adduserinterest';
		params += '&hashing='+hash;
		params += '&id='+id;
		params += '&interest='+interest;
		sys.Net.ReqPOST('/walos.php',params,wal.receivedataInterest);
	}

	wal.receivedataInterest = function(html){
		var hashing = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
		var interest = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
		var pprog = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
		
		
  	 	var bloc_vote = document.getElementById('bloc_vote_'+hashing);
  	 	var curnote = bloc_vote.getAttribute('myvote');
  	 //	var curnote = bloc_vote.getAttribute('myvote');
  	 	curnote = parseInt(curnote);
  	 	if(interest == "1"){
  	 		var newvote = curnote+1;
			bloc_vote.innerHTML = newvote;
  	 		wal.refreshmyvotehisto();
  	 	}
		var app_progress = document.getElementById('app_progress');
		if(app_progress){
			var progress = parseInt(app_progress.innerHTML);
			progress= progress + parseInt(pprog) ;
			if(progress > 100) progress = 100;
			app_progress.innerHTML = progress;
			if(progress == 100){
				var params = 'mode=updateheader';
				sys.Net.ReqPOST('/walos.php',params,wal.receivedataHeader);
			}
		}
	//	wal.move_blocforrate(hashing,topw,txtnote,interest);
	//	alert('vote '+interest+' sur la news '+ hashing);
	}

	wal.receivedataHeader = function(html){
	 	var header = document.getElementById('bloc_user');
	 	var content_all = document.getElementById('content_all');
	 	content_all.removeChild(header);
	 	content_all.innerHTML = html + content_all.innerHTML;
	 	
	}
	
	wal.showhide_news_content = function(link,hash) {
	 	var news_content = document.getElementById('news_content_'+hash);
	 	var isvisible = news_content.getAttribute('visible');
	 	if(isvisible == '0'){
	 	 	news_content.setAttribute('visible',1);
			news_content.style.visibility = 'visible';
			news_content.style.display = 'block';
			news_content.style.height = '';
			link.className = 'minus_btn';
	 	}
		else{
		 	news_content.setAttribute('visible',0);
			news_content.style.visibility = 'hidden';
			news_content.style.display = 'none';
			news_content.style.height = '1px';
			link.className = 'plus_btn';
		}
	}
	
	wal.showhide_menuright = function(link,menuid) {
	 	var menubloc = document.getElementById(menuid);
	 	var menublocheader = document.getElementById(menuid+"_header");
	 	var menublocplus = document.getElementById(menuid+"_plus");
	 	var isvisible = menubloc.getAttribute('visible');
	 	if(isvisible == '0'){
	 	 	menubloc.setAttribute('visible',1);
			menubloc.style.visibility = 'visible';
			menubloc.style.display = 'block';
			menubloc.style.height = '';
			isvisible = '1';
			if(menublocheader){
				menublocheader.className = menuid+'_header_on';
				menublocplus.className = 'rightmenu_header_minus';
			}
	 	}
		else{
		 	menubloc.setAttribute('visible',0);
			menubloc.style.visibility = 'hidden';
			menubloc.style.display = 'none';
			menubloc.style.height = '1px';
			isvisible = '0';
			if(menublocheader){
				menublocheader.className = menuid+'_header_off';
				menublocplus.className = 'rightmenu_header_plus';
			}
		}
		wal.savemyconfgui(menuid,isvisible);
	}
	
	wal.savemyconfgui = function(name,value) {
		var params = 'mode=savemyconfgui';
		params += '&name='+name;
		params += '&value='+value;
		sys.Net.ReqPOST('/walos.php',params,wal.receivesavemyconfgui);
	}
	wal.receivesavemyconfgui = function(html){
	}
	
	wal.move_blocforrate = function(hashing,topbase,txtnote,interest){
	  	var divbloc = document.getElementById('listing_blocforrate_'+hashing);
	  	if(divbloc.offsetTop < (topbase - 42)){
	  	 	var divnote = document.getElementById(txtnote);
	  	 	var curnote = parseInt(divnote.innerHTML);
	  	 	divnote.innerHTML = curnote+1;
	  	 	
	  	 	var blocsb = document.getElementById('listing_statusbar_'+hashing);
	  	 	var rtotvot = blocsb.getAttribute('rtotvot');
			var rint = blocsb.getAttribute('rint');
			var rnotint = blocsb.getAttribute('rnotint');
			var blocimg = document.getElementById('listing_sbimg_'+hashing);

		  	var val = 0;
			if(rint>0){
				val = rint/(parseInt((100/rtotvot)));
				if(interest > 0 ) val++;
				rtotvot++;
				val = parseInt((val/rtotvot)*10);
				rint = parseInt((val/rtotvot)*100);
			}
			else{
			  	if(interest > 0 ) val++;
			  	rtotvot++;
			  	val = parseInt((val/rtotvot)*10);
				
			}

			blocimg.src = '/img/design/reader/rating_'+val+'.gif';

	  	 	wal.reduce_blocforrate(hashing);
	  	 	return;
	  	}
	  	divbloc.style.top=(divbloc.offsetTop - 2)+ 'px';
	  	window.setTimeout('wal.move_blocforrate(\''+hashing+'\','+topbase+',\''+txtnote+'\',\''+interest+'\')', 1);
	  	
	}
	
	wal.reduce_blocforrate = function(hashing){
	  	var divbloc = document.getElementById('listing_blocforrate_'+hashing);
	  	if(divbloc.offsetWidth <= 3){
	  	 	return;
	  	}
	  	divbloc.style.width=(divbloc.offsetWidth - 3)+ 'px';
	  	//alert(divbloc.style.width);return;
	  	window.setTimeout('wal.reduce_blocforrate(\''+hashing+'\')', 1);
	  	
	}
	
	wal.disploading = function(target){
	 	if(target.tagName == 'TABLE'){
			var elt = document.createElement('tr');
			var elttd = document.createElement('td');
		  	var text = '<img src="/img/design/reader/loading.gif" width="16" height="16" alt="" /> '+Lang.window_loading;
		  	elttd.innerHTML = text;
			elt.appendChild(elttd);
		  	target.appendChild(elt);
		}
	 	else
	 	 	target.innerHTML = '<img src="/img/design/reader/loading.gif" width="16" height="16" alt="" /> '+Lang.window_loading;
	}
	
/*** Search feed ***/
	wal.searchfeed = function(){
	 	var s_feeds = document.getElementById("s_feeds");
	 	var s_items = document.getElementById("s_items");
		var divsearch = document.getElementById("search_feed_text");
		var divcontent = document.getElementById("search_content");
		var kword = divsearch.value;
		if (kword == "") return;
	 	if(s_feeds.checked == true){
		/*	var params = 'mode=search_feed';
			params += '&kword='+kword;
			wal.disploading(divcontent);
			sys.Net.ReqPOST('/walos.php',params,wal.receivesearchfeed);*/
			location.href = "http://"+location.hostname+"/linkio.php?mode=searchf&s="+encodeURI(kword);
		}
		else if(s_items.checked == true){
		 	location.href = "http://"+location.hostname+"/s/"+encodeURI(kword);
		}
	}
	
	
	wal.receivesearchfeed = function(html){
	    var divsearch = document.getElementById("search_content");
	  	divsearch.innerHTML = html;
	}
	
/*** Arbo ***/
	wal.openarbo = function(id,mylink){
	  	var divarbo = document.getElementById(id);
	  	var visible = divarbo.getAttribute('visible');
	  	
	  	var myparentlink = mylink.parentNode;
	  	var mydirimg = sys.API.getFarElementByClass(myparentlink, 'img_dossier');
	  	var mydirimgsuggest = sys.API.getFarElementByClass(myparentlink, 'img_dossier_suggest');

	  	if(visible == 0){
	  	 	if(mydirimg){
	  	 	 	mydirimg.src = '/img/design/reader/arbo_moins.gif';
	  	 	}
	  	 	if(mydirimgsuggest){
	  	 	 	mydirimgsuggest.src = '/img/design/reader/arbo_moins_suggest.gif';
	  	 	}
			divarbo.style.visibility = 'visible';
			divarbo.style.display = 'block';
			divarbo.style.height = '';
			divarbo.style.overflow = 'hidden';
			divarbo.setAttribute('visible',1);
		}
		else{
	  	 	if(mydirimg){
	  	 	 	mydirimg.src = '/img/design/reader/arbo_plus.gif';
	  	 	}
	  	 	if(mydirimgsuggest){
	  	 	 	mydirimgsuggest.src = '/img/design/reader/arbo_plus_suggest.gif';
	  	 	}
			divarbo.style.visibility = 'hidden';
			divarbo.style.display = 'none';
			divarbo.style.height = '1px';
			divarbo.setAttribute('visible',0);
		}
  	}

	wal.contentarbo = function(tab,name){
		location.href = "http://"+location.hostname+"/tab"+tab+"/"+name+".html";
	}

/*** Add flux ***/
	wal.addflux = function(flux){
	    var divtab = document.getElementById("selecttab");
		params = 'mode=listpages';
		params += '&flux='+flux;
		params += '&id_tab='+divtab.options[divtab.selectedIndex].value;
		sys.Net.ReqPOST('/walos.php?',params,wal.addfluxrecieve);
		
  	}

	wal.addfluxrecieve = function(html){
		var flux = html.substr(0,html.indexOf('##'));
		html = html.substr(html.indexOf('##')+2);
	//	var item = html.substr(0,html.indexOf('##'));
	//	html = html.substr(html.indexOf('##')+2);
	//	var divinfoparent = document.getElementById('addflux_'+item);
		//alert(html);
		//location.href = "http://"+location.hostname+"/linkio.php";
		Signin.show_walpopup_ext('popaddfeed_finish',flux);
	//	divinfoparent.innerHTML = html;
  	}
/*** Avatars ***/
	wal.avatcnt = 1;
	wal.avatarright = function(){
		 var leftavatar = document.getElementById("avatar"+(wal.avatcnt));
		 var rightavatar = document.getElementById("avatar"+(wal.avatcnt+5));
		 if(leftavatar){
			leftavatar.style.visibility = 'hidden';
			leftavatar.style.display = 'none';
			leftavatar.style.width = '0px';
		 }
	 	 if(rightavatar){
			rightavatar.style.visibility = '';
			rightavatar.style.display = '';
			rightavatar.style.width = '';
			wal.avatcnt++;
	 	 }

	 	 wal.updaterow();
	}
	wal.avatarleft = function(){
		 var leftavatar = document.getElementById("avatar"+(wal.avatcnt-1));
		 var rightavatar = document.getElementById("avatar"+(wal.avatcnt+4));
	 	 if(leftavatar){
			leftavatar.style.visibility = '';
			leftavatar.style.display = '';
			leftavatar.style.width = '';
			wal.avatcnt--;
	 	 }
		 if(rightavatar){
			rightavatar.style.visibility = 'hidden';
			rightavatar.style.display = 'none';
			rightavatar.style.width = '0px';
		 }
	 	 wal.updaterow();
	}
	
	wal.updaterow = function(){
		 var leftavatar = document.getElementById("avatar"+(wal.avatcnt-1));
		 var rightavatar = document.getElementById("avatar"+(wal.avatcnt+5));
		 var leftrow = document.getElementById("rowleftavatar");
		 var rightrow = document.getElementById("rowrightavatar");
		 if(!rightavatar){
			rightrow.style.visibility = 'hidden';
			rightrow.style.display = 'none';
			rightrow.style.height = '1px';
		//	wal.avatcnt--;
		 }
		 else{
			rightrow.style.visibility = '';
			rightrow.style.display = '';
			rightrow.style.height = '';
		 }
		 if(!leftavatar){
			leftrow.style.visibility = 'hidden';
			leftrow.style.display = 'none';
			leftrow.style.height = '1px';
			//wal.avatcnt--;
		 }
		 else{
			leftrow.style.visibility = '';
			leftrow.style.display = '';
			leftrow.style.height = '';
		 }
	}
	wal.setavatar = function(stravatar){
		var divavatar = document.getElementById(stravatar);	
		var url = divavatar.getAttribute('url');
		params = 'mode=updateavatar';
		params += '&url='+url;
		sys.Net.ReqPOST('/walos.php?',params,wal.setavatarrecieve);
	}
	
	wal.setavatarrecieve = function(html){
		var pannel_avatar = document.getElementById("pannel_avatar");
		var header_avatar = document.getElementById("header_avatar");
		pannel_avatar.src = html;
		header_avatar.src = html;
	}
	
	wal.changetab = function(tab){
		var bloc_tab_left = document.getElementById("bloc_tab_left");
		var bloc_tab_right = document.getElementById("bloc_tab_right");
		if(tab == 'tags'){
			bloc_tab_left.style.visibility = 'hidden';
			bloc_tab_left.style.display = 'none';
			bloc_tab_left.style.height = '1px';
			bloc_tab_right.style.visibility = 'visible';
			bloc_tab_right.style.display = '';
			bloc_tab_right.style.height = '';
			document.getElementById('bloc_tab_firstl').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_off_left.gif\" width=\"8\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_first').className = 'bloc_tab_off';
			document.getElementById('bloc_tab_firstr').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_off_right.gif\" width=\"5\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_secondl').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_on_left.gif\" width=\"7\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_second').className = 'bloc_tab_on';
			document.getElementById('bloc_tab_secondr').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_on_right.gif\" width=\"5\" height=\"25\" alt=\"\" />";
		}
		else{
			bloc_tab_left.style.visibility = 'visible';
			bloc_tab_left.style.display = '';
			bloc_tab_left.style.height = '';
			bloc_tab_right.style.visibility = 'hidden';
			bloc_tab_right.style.display = 'none';
			bloc_tab_right.style.height = '1px';
			document.getElementById('bloc_tab_firstl').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_on_left.gif\" width=\"8\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_first').className = 'bloc_tab_on';
			document.getElementById('bloc_tab_firstr').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_on_right.gif\" width=\"5\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_secondl').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_off_left.gif\" width=\"7\" height=\"25\" alt=\"\" />";
			document.getElementById('bloc_tab_second').className = 'bloc_tab_off';
			document.getElementById('bloc_tab_secondr').innerHTML = "<img src=\"/img/design/walumba/matoumba/bloc_tab_off_right.gif\" width=\"5\" height=\"25\" alt=\"\" />";
		}
	}
	
	wal.verifeed = function(){	 
		var inputurl = document.getElementById('inputurlfeed');
		if(!inputurl)return;
		if(inputurl.value == '' ) return;
	    var recieve_registerfeed = document.getElementById('recieve_registerfeed');
	    wal.disploading(recieve_registerfeed);
		var params = 'mode=verifeed';
		params += '&url='+(encodeURIComponent(inputurl.value));	
		sys.Net.ReqPOST('/walos.php?',params,wal.verifeedrecieve);
	}
	
	wal.verifeedrecieve = function(html){
	    var recieve_registerfeed = document.getElementById('recieve_registerfeed');
	    recieve_registerfeed.innerHTML = html;
	}
	
	wal.importopml = function(){	 
		var formopml = document.getElementById('formopml');
		if(!formopml)return;
		formopml.target='iframeopml';
		formopml.action='/walos.php';
		formopml.submit();
	}
	
	wal.importallopml = function(path){	 
		if(!path)return;
		
	    var recieve_registerfeed = document.getElementById('recieve_registerfeed');
	    wal.disploading(recieve_registerfeed);
		var params = 'mode=importallopml';
		params += '&url='+(encodeURIComponent(path));	
		sys.Net.ReqPOST('/walos.php?',params,wal.importallopmlrecieve);
	}
	
	wal.importallopmlrecieve = function(html){
	    var recieve_registerfeed = document.getElementById('recieve_registerfeed');
	  //  recieve_registerfeed.innerHTML = html;
//	   alert(html);
	    location.href = "http://"+location.hostname+"/linkio.php";
	}	
	
	wal.import_local_avatar = function(){	 
		var formlocalavatar = document.getElementById('formlocalavatar');
		if(!formlocalavatar)return;
		formlocalavatar.target='iframeavatar';
		formlocalavatar.action='/walos.php';
		formlocalavatar.submit();
	}
	
	wal.importallopml = function(path){	 
		if(!path)return;
		
	    var recieve_registerfeed = document.getElementById('recieve_registerfeed');
	    wal.disploading(recieve_registerfeed);
		var params = 'mode=importallopml';
		params += '&url='+(encodeURIComponent(path));	
		sys.Net.ReqPOST('/walos.php?',params,wal.importallopmlrecieve);
	}
	
	wal.removefeed = function(feed){	 
		if(!feed)return;
		if (confirm(Lang.confirm_feed_delete)) {
			var params = 'mode=removefeed';
			params += '&feed='+(feed);
			sys.Net.ReqPOST('/walos.php?',params,wal.removefeedrecieve);
		}
	}

	wal.removefeedrecieve = function(feed){	 
		location.href = "http://"+location.hostname+"/linkio.php";
	}
	
	wal.preparedata = function(data){
	  	 if (!isNaN(data))return data;
		 while(data.indexOf('\n')!= -1)data = data.replace('\n','<br>');
		 while(data.indexOf('\r')!= -1)data = data.replace('\r','');
		 while(data.indexOf(':')!= -1)data = data.replace(':','<__>');
		 while(data.indexOf('#')!= -1)data = data.replace('#','<___>');
		 while(data.indexOf('\'')!= -1)data = data.replace('\'','<_app_>');
		 data = escape(data);
		 return data;
	}
	
	wal.cpttab = 0;
	wal.updatetab = function(){	 
	  var formlisttab = document.getElementById("formlisttab");
	  var allinput=formlisttab.getElementsByTagName("input");
	  
	  var params ='mode=postupdatetab';
	  var listtab = '&listtab=';
	  for ( var i = 0 ; i < allinput.length ; i++){
	  		listtab = listtab + allinput[i].name + ",";
	  		params += "&" + allinput[i].name + "=" + wal.preparedata(allinput[i].value) ;
	  }
	  params += listtab;
	  sys.Net.ReqPOST('/walos.php?',params,wal.updatetabrecieve);
	}
	
	wal.updatetabrecieve = function(html){
	 //	alert(html);	 
	  	location.href = "http://"+location.hostname+"/linkio.php";
	}
	
	wal.removetab = function(idtab){	 
	  	var divtd = document.getElementById(idtab);
	  	if(confirm("Vous allez supprimer ce dossier et tout son contenu. Etes-vous sur de vouloir continuer ?")){
	  	 	divtd.innerHTML = ''; 
			divtd.style.visibility = 'hidden';
			divtd.style.display = 'none';
			divtd.style.height = '1px';
	  	}
	}
	
	wal.addtab = function(idtab){	 
		wal.cpttab++;
		var formlisttab = document.getElementById("reperetab");
		var tab = formlisttab.parentNode;
		var elt = document.createElement('tr');
		var elttd = document.createElement('td');
		elttd.id= "newtab_"+wal.cpttab;
	  	var text = "<img src=\"/img/design/walumba/matoumba/dir_manage_tab.gif\" width=\"20\" height=\"14\"  style=\"vertical-align:middle\" alt=\"\" />&nbsp;<input type=\"text\" name=\"newtab_"+wal.cpttab+"\" value=\"Nouveau dossier\" style=\"border:1px solid #BDBDBD\" /> <a onmousedown=\"javascript:wal.removetab('newtab_"+wal.cpttab+"')\"><img src=\"/img/design/walumba/matoumba/dir_del_tab.gif\" width=\"22\" height=\"13\" alt=\"\"  style=\"vertical-align:middle\" /></a>";
	  	elttd.innerHTML = text;
		elt.appendChild(elttd);
	  	tab.appendChild(elt);
	}
	
	wal.searchrelfeed = function(){
		var divtab_suggest_feed = document.getElementById('tab_suggest_feed');	
		var visible = divtab_suggest_feed.getAttribute('visible');
		if(visible == 1){
			wal.disploading(divtab_suggest_feed);
			params = 'mode=searchrelfeed';
			sys.Net.ReqPOST('/walos.php?',params,wal.searchrelfeedrecieve);
		}
	}
	
	wal.searchrelfeedrecieve = function(html){
		var divtab_suggest_feed = document.getElementById('tab_suggest_feed');	
	  	divtab_suggest_feed.innerHTML = html;
	}
	
	wal.editmytabconf = function(ref){
	 	var divlabel = document.getElementById('label_'+ref);
	 	var divinput = document.getElementById('winconf_'+ref);
	 	
	  	var visible = divinput.getAttribute('visible');
	  	if(visible == 0){
	  	 	var labelwidth = divlabel.offsetWidth;
			divlabel.style.visibility = 'hidden';
			divlabel.style.display = 'none';
			divlabel.style.height = '1px';
			divinput.style.visibility = 'visible';
			divinput.style.display = 'inline';
			divinput.style.height = '';
			divinput.style.width = (labelwidth+20) + "px";
			divinput.focus();
			divinput.select();
			divinput.setAttribute('visible',1);
		}
		else{
		 	divlabel.innerHTML = divinput.value;
			divlabel.style.visibility = 'visible';
			divlabel.style.display = 'inline';
			divlabel.style.height = '';		
			divinput.style.visibility = 'hidden';
			divinput.style.display = 'none';
			divinput.style.height = '1px';
			divinput.setAttribute('visible',0);
		}
	}
	
	wal.delmytabconf = function(ref){
	 	var divfeedconf = document.getElementById('feedconf_'+ref);
	  	if(confirm("Vous allez supprimer ce flux de vos abonnements. Etes-vous sur de vouloir continuer ?")){
	  	 	divfeedconf.innerHTML = ''; 
			divfeedconf.style.visibility = 'hidden';
			divfeedconf.style.display = 'none';
			divfeedconf.style.height = '1px';
			divfeedconf.style.padding = '0px';
			divfeedconf.parentNode.style.visibility = 'hidden';
			divfeedconf.parentNode.style.display = 'none';
			divfeedconf.parentNode.style.height = '1px';
	  	}
	}
	
	wal.sideplayer_rel = function(item){
		var sideplayer_content_rel = document.getElementById('sideplayer_content_rel');
		var sideplayer_content_news = document.getElementById('sideplayer_content_news');
		var sideplayer_news = document.getElementById('sideplayer_news');
		var sideplayer_rel = document.getElementById('sideplayer_rel');
		var sideplayer_news_border = document.getElementById('sideplayer_news_border');
		var sideplayer_rel_border = document.getElementById('sideplayer_rel_border');
		sideplayer_content_news.style.visibility = 'hidden';
		sideplayer_content_news.style.display = 'none';
		sideplayer_content_news.style.height = '1px';
		sideplayer_content_rel.style.visibility = 'visible';
		sideplayer_content_rel.style.display = '';
		sideplayer_content_rel.style.height = '';
		sideplayer_news_border.style.borderBottom = '1px solid #D9D9D9';
		sideplayer_rel_border.style.borderBottom = '1px solid #ffffff';
		wal.disploading(sideplayer_content_rel);
		params = 'mode=sideplayer_rel';
		params += '&item='+(item);
		sys.Net.ReqPOST('/walos.php?',params,wal.sideplayer_relrecieve);

	}
	
	wal.sideplayer_relrecieve = function(html){
		var sideplayer_content_rel = document.getElementById('sideplayer_content_rel');	
		sideplayer_content_rel.innerHTML = html;
	}
	
	wal.sideplayer_news = function(){
		var sideplayer_content_rel = document.getElementById('sideplayer_content_rel');
		var sideplayer_content_news = document.getElementById('sideplayer_content_news');
		var sideplayer_news = document.getElementById('sideplayer_news');
		var sideplayer_rel = document.getElementById('sideplayer_rel');
		var sideplayer_news_border = document.getElementById('sideplayer_news_border');
		var sideplayer_rel_border = document.getElementById('sideplayer_rel_border');
		sideplayer_content_rel.style.visibility = 'hidden';
		sideplayer_content_rel.style.display = 'none';
		sideplayer_content_rel.style.height = '1px';
		sideplayer_content_news.style.visibility = 'visible';
		sideplayer_content_news.style.display = '';
		sideplayer_content_news.style.height = '';		
		sideplayer_news_border.style.borderBottom = '1px solid #ffffff';
		sideplayer_rel_border.style.borderBottom = '1px solid #D9D9D9';
		
	}
	
	wal.inchratrollup = function(item){
	 	var inchrateup = document.getElementById('inchrateup_'+item);
	 	var inchratedown = document.getElementById('inchratedown_'+item);
	 	inchrateup.src = '/img/design/walumba/matoumba/inchrate_up_top_roll.gif';
	 	inchratedown.src = '/img/design/walumba/matoumba/inchrate_up_bottom_roll.gif';
	}
	
	wal.inchratrolldown = function(item){
	 	var inchrateup = document.getElementById('inchrateup_'+item);
	 	var inchratedown = document.getElementById('inchratedown_'+item);
	 	inchrateup.src = '/img/design/walumba/matoumba/inchrate_down_top_roll.gif';
	 	inchratedown.src = '/img/design/walumba/matoumba/inchrate_down_bottom_roll.gif';
	}
	
	wal.inchratout = function(item){
	 	var inchrateup = document.getElementById('inchrateup_'+item);
	 	var inchratedown = document.getElementById('inchratedown_'+item);
	 	inchrateup.src = '/img/design/walumba/matoumba/inchrate_top_def.gif';
	 	inchratedown.src = '/img/design/walumba/matoumba/inchrate_bottom_def.gif';
	}
	
	wal.showmenu_item = function(item,showitem){
	 	var menu_item = document.getElementById(item);
	 	var isvisible = menu_item.getAttribute('visible');
	 	if(showitem == 1 && isvisible == '0'){
	 	 	menu_item.setAttribute('visible',1);
			menu_item.style.visibility = 'visible';
			menu_item.style.display = 'block';
			menu_item.style.height = '';
	 	}
		else if(showitem == 0 && isvisible == '1'){
		 	menu_item.setAttribute('visible',0);
			menu_item.style.visibility = 'hidden';
			menu_item.style.display = 'none';
			menu_item.style.height = '1px';
		}
	}