function hide(url_clicked, url_div, id) {
	if(url_clicked!=url_div)
	{// podmieniamy danego diva na niewidocznego
			jQuery.noConflict();
			jQuery(document).ready(
			function(){
				jQuery("#"+id).replaceWith('<div style="display:none"></div>');
			});
	}
}

function hide_vote(url_voted, url, id) {
	url_voted = url_voted.split("*****");
	var counter = url_voted.length - 1;
	var i = 0;
	for(i=0;i<counter;i++)
	{
		if(url_voted[i]==url)
		{// podmieniamy danego diva na niewidocznego
				jQuery.noConflict();
				jQuery(document).ready(
				function(){
					jQuery("#"+id).replaceWith('<div style="display:none"></div>');
				});
		}
	}
}

function replace_vote(url, url_get) {
	//-- podmieniamy link ocen
	jQuery.noConflict();
	jQuery(document).ready(
	function(){
		var posiX = 0;
		jQuery("#container").mousemove(function(e){
	   		posiX=e.pageY - 200;
	   	}); 
	   	jQuery("#OcenLink"+url).mouseover(function(e){
	   		jQuery("#OcenLink"+url).replaceWith('<div id="OcenLink'+url+'"><span class="rating_text" style="margin-left: 30px;"><a href="'+url_get+'?ocen='+url+'?posiX='+posiX+'" title="Oceń salon fryzjerski">oceń fryzjera!</a></span></div>');
	   	});
			
	});
}
function draw_votes(idid, namename, iloczyn, rating_width, rating1, rating2, units, count, tense){
	  var title = false;
	  if(rating1>0 && rating1<=1.4) title = "beznadziejny";
	  else if(rating1>=1.5 && rating1<=2.4) title = "słaby fryzjer";
	  else if(rating1>=2.5 && rating1<=3.4) title = "może być fryzjer";
	  else if(rating1>=3.5 && rating1<=4.4) title = "dobry fryzjer";
	  else if(rating1>=4.5) title = "bardzo dobry fryzjer";
	  else if(rating1==0) title = "brak oceny";
	  else title = "";
	var napis = '<div title=\" '+title+' \" alt=\"\" id=\"unit_long'+idid+'\"><ul id=\"unit_ul'+idid+'\" class=\"unit-rating\" style=\"width:'+iloczyn+'px; \"><li class=\"current-rating\" style=\"width:'+rating_width+'px; \">Currently'+units+'/'+count+'</li></ul></div>';
	document.write(napis);	
}

function validate_comment_area(url){
	// -- walidacja textarea naduzycie
	jQuery(document).ready(
	function(){
		var pos = 0;
		jQuery("#container").mousemove(function(e){
		   		pos=e.pageY - 200;
		}); 
		 jQuery("#container").mousemove(function(){													
			jQuery("#add_comment").mouseover(function(){	
				if(jQuery("#Comment").val()!="" && jQuery("#Comment").val()!="Treść komentarza")
				{
					jQuery("#form_comment").replaceWith('<form id="form_comment" action="fryzjer/'+url+'" method="post" class="comment_form_layout"><textarea id="Comment" name="comment" class="comment_textarea1">'+jQuery("#Comment").val()+'</textarea><input id="add_comment" type="image" src="themes/blackcandy/images/comment_button.gif" class="comment_button"></form>');
			 	}
				if(jQuery("#Comment").val()=="" || jQuery("#Comment").val()=="Treść komentarza")
				{
					jQuery("#form_comment").replaceWith('<form id="form_comment" action="fryzjer/'+url+'" method="" class="comment_form_layout"><textarea id="Comment" name="" class="comment_textarea1">'+jQuery("#Comment").val()+'</textarea><input id="add_comment" type="image" src="themes/blackcandy/images/comment_button.gif" class="comment_button"></form>');
				 }
			 });
		 });
		 
		});
}
function replace_abuse(url, url_get){
	// -- podmieniamy link zglos naduzycie
	jQuery.noConflict();
	jQuery(document).ready(
	function(){
		var posiX = 0;
		jQuery("#container").mousemove(function(e){
	   		posiX=e.pageY - 200;
	   	}); 
	   	jQuery("#ZglosLink"+url).mouseover(function(e){
	   		jQuery("#ZglosLink"+url).replaceWith('<div id="ZglosLink'+url+'"><span class="salon_text_small"><a href="'+url_get+'?zglos_form='+url+'?posiX='+posiX+'" title="Zgłoś błąd na stronie">Zgłoś błąd na stronie</a></span></div>');
	   	});	
	});
}
function check_user(url, user){
	if(user=="0")
	{
		jQuery.noConflict();
		jQuery(document).ready(
		function(){
			jQuery("#ZglosLink"+url).replaceWith('<div id="ZglosLink'+url+'"><span class="salon_text_small"><a href="ForumMemberProfile/register/login" title="zaloguj się">Zgłoś błąd na stronie</a></span></div>');
		});
	}
}
function moderate_salon(url, active, Name, Code, City, Adres, Phone1, WWW, Email, SalonRegion){
	if(active=="2")
	{
		jQuery.noConflict();
		jQuery(document).ready(
		function(){
			jQuery("#salon_"+url).replaceWith('<div id="salon_'+url+'" name="'+url+'" style="background-color: #ff0000;"><h3>Name: '+Name+'</h3><br />Kod: '+Code+'<br />City: '+City+'<br />Adres: '+Adres+'<br />Phone1: '+Phone1+'<br />Www: '+Www+'<br />Email: '+Email+'<br />Salon region: '+SalonRegion+'</div>');
		});
	}
}
