function fix_flash(container) {
    if( container==undefined ) return;
	
	// loop through every embed tag on the site
	$(container+" embed").each(function(i){
		
		embed = this;		
        var new_embed;
        // everything but Firefox & Konqueror
        if (embed.outerHTML) {
            var html = embed.outerHTML;
            // replace an existing wmode parameter
            if (html.match(/wmode\s*=\s*('|")[a-zA-Z]+('|")/i))
                new_embed = html.replace(/wmode\s*=\s*('|")window('|")/i, "wmode='transparent'");
            // add a new wmode parameter
            else
                new_embed = html.replace(/<embed\s/i, "<embed wmode='transparent' ");
            // replace the old embed object with the fixed version
            embed.insertAdjacentHTML('beforeBegin', new_embed);
            embed.parentNode.removeChild(embed);
        } else {
            // cloneNode is buggy in some versions of Safari & Opera, but works fine in FF
            new_embed = embed.cloneNode(true);
            if (!new_embed.getAttribute('wmode') || new_embed.getAttribute('wmode').toLowerCase() == 'window')
                new_embed.setAttribute('wmode', 'transparent');
            embed.parentNode.replaceChild(new_embed, embed);
        }				
		
	});
			
	$(container+" object").each(function(i){
				
		object = this;
        var new_object;
        // object is an IE specific tag so we can use outerHTML here
        if (object.outerHTML) {
            var html = object.outerHTML;
            // replace an existing wmode parameter
            if (html.match(/<param\s+name\s*=\s*('|")wmode('|")\s+value\s*=\s*('|")[a-zA-Z]+('|")\s*\/?\>/i))
                new_object = html.replace(/<param\s+name\s*=\s*('|")wmode('|")\s+value\s*=\s*('|")window('|")\s*\/?\>/i, "<param name='wmode' value='transparent' />");
            // add a new wmode parameter
            else
                new_object = html.replace(/<\/object\>/i, "<param name='wmode' value='transparent' />\n</object>");
            // loop through each of the param tags
            var children = object.childNodes;
            for (j = 0; j < children.length; j++) {
                try {
                    if (children[j] != null) {
                        var theName = children[j].getAttribute('name');
                        if (theName != null && theName.match(/flashvars/i)) {
                            new_object = new_object.replace(/<param\s+name\s*=\s*('|")flashvars('|")\s+value\s*=\s*('|")[^'"]*('|")\s*\/?\>/i, "<param name='flashvars' value='" + children[j].getAttribute('value') + "' />");
                        }
                    }
                }
                catch (err) {
                }
            }
            // replace the old embed object with the fixed versiony
            object.insertAdjacentHTML('beforeBegin', new_object);
            object.parentNode.removeChild(object);
        }				
				
	});
	
}


function mycarousel_initCallback(carousel)
{
	$("#"+carousel.options.id+' .jcarousel-control a').bind('click', function() {
		carousel.scroll(jQuery.jcarousel.intval(jQuery(this).attr( "id" )));
		//carousel.stopAuto();
		return false;
	});
	
	
	$("#"+carousel.options.id+' .jcarousel-control a').hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
	
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

function mycarousel_itemVisibleInCallback(carousel,list,idx)
{
	$("#"+carousel.options.id+' .jcarousel-control').children(".selected").removeClass("selected");
	$("#"+carousel.options.id+' .jcarousel-control').children("#"+idx).addClass( "selected" );
}


function captchaReload(id){
	var randomnumber=Math.floor(Math.random()*101);
	document.getElementById(id).src = "/captcha.jpg?"+randomnumber;
	$('#captcha').val('');
}

function product_availability(id,maxim){
	var val = ($("#"+id).val())?parseInt($("#"+id).val()):0;
	maxim = (maxim)?parseInt(maxim):0;

	if( val > maxim ){
		alert("NU puteti comanda cantitatea dorita!");
		$("#"+id).val(maxim).focus();
		return false;
	}
	return true;
}

jQuery.fn.resetDefaultValue = function() {
	function _clearDefaultValue() {
		var _$ = $(this);
		if ( _$.val() == this.defaultValue ) { _$.val(''); }
	};
	function _resetDefaultValue() {
		var _$ = $(this);
		if ( _$.val() == '' ) { _$.val(this.defaultValue); }
	};
	return this.click(_clearDefaultValue).focus(_clearDefaultValue).blur(_resetDefaultValue);
}


function GetCover(id,action){
	 $("#cover").load("/framework/covers/read.php?cover_id="+id+"&action="+action);
}
function Yahoo()
{
	window.location=encodeURI('ymsgr:im?msg='+(window.location.href));
}
function OpenMedia(media,article_id,id)
{
	if (media==4){
		$("#media").load("/framework/article/read_video.php?article_id="+article_id+"&id="+id);	
	}else if (media==3){
		$("#media").load("/framework/article/read_audio.php?article_id="+article_id+"&id="+id);	
	}else{
		$("#media").load("/framework/article/read_photo.php?article_id="+article_id+"&id="+id);		
	}
	
	$(".media .mediaTabActive").attr("class","mediaTabInactive");
	document.getElementById("mediaTab"+media).className = "mediaTabActive";
	
}

function Voteaza(id)
{
	$.ajax({   
	  type: "POST",   
	  url: "/framework/poll/ajax.php",   
	  data: $('#formpoll'+id).serialize(),
	  success: function(data,text) {
		if (data!=''){ $("#results"+id).html(data);}
	  }
	})
		
//	alert(($('#formpoll').serialize()))
}



function ConcursAwards(obj)
{
	
	if( document.form_concurs.your_name.value=='' ||  document.form_concurs.your_name.value==document.form_concurs.your_name.defaultValue ){
		document.form_concurs.your_name.focus();
		alert("Scrie si tu aici cum te cheama (ramane intre noi...)");
		return;		
	}

	if( document.form_concurs.your_email.value=='' || document.form_concurs.your_email.value==document.form_concurs.your_email.defaultValue ){
		document.form_concurs.your_email.focus();
		alert("Si pe ce adresa de e-mail sa te anuntam?");
		return;	
	}



	$.ajax({   
	  type: "POST",   
	  url: "/concurs.html",   
	  data: $('#form_concurs').serialize(),
	  success: function(data,text) {

			if (data==''){ 
				$('#your_date').html('&nbsp;');
				$(obj).css("background-image", "url(/static/images/concurs/awards_done.png)");
				
				//alert("Felicitari, ai fost inscris in concurs!");
				//document.location.href = document.location.href;
			}else{ 
				alert(data);
			}

		}
	});

}


function Concurs()
{
	
	var name = document.form_concurs.name.value;
	var email = document.form_concurs.name.value;
	
	var msg='';
	var ok=true;
	
	if( !name || name.toLowerCase()=='nume')
	{
		msg += "Nu ati completat Numele!\n";
		ok=false;
	}

	if( !email || email.toLowerCase()=='email')
	{
		msg += "Nu ati completat Email-ul!";
		ok=false;
	}

	if( ok )
	{
		$.ajax({   
		  type: "POST",   
		  url: "/concurs.html",   
		  data: $('#form_concurs').serialize(),
		  success: function(data,text) {
			
			if (data==''){ 
			}else{ 
				alert(data);
			}
			
		  }
		});
		
		$('#form_concurs_container').html('<div style="color:#FFF; font-size:18px; border:0px">Esti inscris in concurs!</div>');
	}else{
		alert(msg);
		return false;
	}
}

function ConcursTdd()
{
	var msg='';
	var ok=true;

	if( !$('#regulament').is(':checked') )
	{
		msg += "Trebuie sa citesti si sa accepti regulamentul!\n";
		ok=false;
	}
	
	if( !parseInt($("#response").val()) )
	{
		msg += "Nu ati selectat o masina!\n";
		ok=false;
	}

	msg = "Concursul s-a terminat!\n";
	ok=false;

	if( ok )
	{
		$.ajax({   
		  type: "POST",   
		  url: "/concurs.html",   
		  data: $('#form_concurs').serialize(),
		  success: function(data,text) {
			
			if (data==''){ 
				$('#form_concurs_container').html('<br /><br /><br /><br /><center><img src="/static/images/concurs/tdd_after_register.jpg" style="display:block" width="366" height="98" /></center>');
			}else{ 
				alert(data);
			}
			
		  }
		});
		
	}else{
		alert(msg);
		return false;
	}
}




function Concurs2()
{
	return false;
	
	if( document.form_concurs.supercar.value ){
	
	}else{
		alert("Nu ati selectat o masina!");
		return false;
	} 
	
	
	if(document.form_concurs.regulament.checked){
		$.ajax({   
		  type: "POST",   
		  url: "/concurs.html",   
		  data: $('#form_concurs').serialize(),
		  success: function(data,text) {
			
			if (data==''){ 
				//$('#concurs_done').toggle(); 
				//$('#form_concurs').toggle() 
			}else{ 
				alert(data);
			}
			
		  }
		});
		
		fb();
		
		$('.checksupercar').each(function(index) {
			$(this).unbind('click');
			$(this).unbind('mouseover');
			$(this).unbind('mouseout');
		});
		
		$('#participa').html('<div style="color:#FFF; font-size:18px; border:0px">Esti inscris in concurs!</div>');
		
	}else{
		document.form_concurs.regulament.focus();
		alert("Nu ati citit regulamentul concursului!");
	}

	
		
//	alert(($('#formpoll').serialize()))
}
function Concurs1()
{
	var ischecked = false;
	$('.checksupercar').each(function(index) {
		if($(this).attr('checked'))
			ischecked = true;
	});

	
	if(ischecked==false){
		alert("Nu ati bifat o masina!");
	}else if(document.form_concurs.regulament.checked){
		$.ajax({   
		  type: "POST",   
		  url: "/concurs.html",   
		  data: $('#form_concurs').serialize(),
		  success: function(data,text) {
			if (data==''){ $('#concurs_done').toggle(); $('#form_concurs').toggle() }else{ alert(data);}
		  }
		});
		
		fb();
		
	}else{
		document.form_concurs.regulament.focus();
		alert("Nu ati citit regulamentul concursului!");
	}

	
		
//	alert(($('#formpoll').serialize()))
}


function SubscribeNewsletter(lang)
{
	if( $('#email').attr("value") == "" )
	{
		alert( 'Nu ati completat campul Email' );
		$('#email').focus();
		return false;
	}
		var temp= new String($('#email').attr("value"));
		var len=temp.length - 3;
		if(temp=="" || temp.indexOf("@")<0 || temp.indexOf(".")<0 || temp.lastIndexOf(".")> len || temp.length-temp.lastIndexOf(".")>4)
		{
			alert("Va rugam introduceti o adresa de email corecta!");
		//	$('#email').attr("value") = "";
			$('#email').focus();
			return false;
		}


	$.post(  
		"/framework/newsletter/newsletter.php?lang="+lang,  
		$("#ajax-form").serialize(),  
		function(data){  
			$("#body_form").html(data);
		}  
	);  
}	
 
function RemberPass(lang)
{
	$.post(  
		"/framework/users/forget_password.php?lang="+lang,  
		$("#form-pass").serialize(),  
		function(data){  
			$("#div_password").html(data);
		}  
	); 
}

function Galerie(id)
{
	window.open("/popup_"+id+".html",'','width=800,height=630,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0');
}
function GalerieVideo(id)
{
	window.open("/video_"+id+".html",'','width=800,height=630,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0');
}


function CreateBookmarkLink() { 
	title = document.title;   // Blogger - Replace with <$BlogItemTitle$>   // MovableType - Replace with <$MTEntryTitle$> 
	url = window.location.href;  // Blogger - Replace with <$BlogItemPermalinkURL$>   // MovableType - Replace with <$MTEntryPermalink$>  // WordPress - <?php bloginfo('url'); ?>	
	if($.browser.msie){

		window.external.AddFavorite( url, title); 
	} else if( window.sidebar ) { // IE Favorite
		window.sidebar.addPanel(title, url,"");	
	}	else if(window.opera && window.print) { // Opera Hotlist		
		return true; 
	} 
} 



function OpenPrint(print_id){
	window.open(window.location.href='/print-'+print_id+'.html','print','width=700,height=500,scrollbars=yes');
	return false;
}
function Show(obiect,day)
{
	var s=new jQuery(obiect);
	var position = s.position();
	
	$("#box_calendar_events").css("display","block");
	$("#box_calendar_events").css("left",position.left+20);
	$("#box_calendar_events").css("top",position.top +20);
	$("#box_calendar_events .body").html(ev[day]);
}


function Yahoo()
{
	window.location=encodeURI('ymsgr:im?msg='+(window.location.href));
}

//---------------------send email		
function SendEmail(url){
	if (CheckFormEmail()){
		 
		    $.ajax({
			  type: "POST",
			  url: url,
			  data:  $("#sendemail").serialize(),
			  success: function(data,text) {
				$("#box_email").html(data);
			  }
			});
			return false;
	}	 
}

function CheckFormEmail(){
	
	if( $("#name").attr("value") == "" )
	{
		alert( 'Nu ati completat campul Nume' );
		$('#name').focus();
		return false;
	}
	
	if( $('#email').attr("value") == "" )
	{
		alert( 'Nu ati completat campul Email' );
		$('#email').focus();
		return false;
	}
	var temp= new String($('#email').attr("value"));
	var len=temp.length - 3;
	if(temp=="" || temp.indexOf("@")<0 || temp.indexOf(".")<0 || temp.lastIndexOf(".")> len || temp.length-temp.lastIndexOf(".")>4)
	{
		alert("Va rugam introduceti o adresa de email corecta!");
	//	$('#email').attr("value") = "";
		$('#email').focus();
		return false;
	}
	
	if( $("#text").attr("value") == "" )
	{
		alert( 'Nu ati completat campul Feedback' );
		$('#text').focus();
		return false;
	}
	
	
	return true;
}

function OpenBox(url){
	 $("#box_email").load(url);
	 
	ttop=0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
		ttop=window.pageYOffset;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
		ttop=document.documentElement.scrollTop;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		ttop=document.body.scrollTop;
	}

	l = (myWidth-700)/2;
	t = (myHeight-250)/2+ttop ; 
	
	 $('#box_email').css('left',l+'px');
	 $('#box_email').css('top' , t+'px'); 
	 
	 $('#box_email').css('display','block');
}

function Close(name){
	$('#'+name).css('display','none');
} 
function ChangeMonthCalendar(year,month)
{
	$("#box_calendar").load('/calendar_show.php?year='+year+"&month="+month);
}

function countChar(text,div,numar_caractere) {	
	val = text.value;
	if (val.length > numar_caractere) {
		alert('Textul dumneavoastra depaseste limita de '+numar_caractere+' de caractere!');
		text.value = val.substring(0,numar_caractere);
		text.focus();
	}
	document.getElementById(div).innerHTML = parseInt(numar_caractere-val.length);
}


function sidebar_discuri_toggle()
{
	$('#sidebar_discuri_closed').toggle();
	$('#sidebar_discuri_contents').toggle();
}

function sidebar_interviuri_toggle()
{
	$('#sidebar_interviuri_closed').toggle();
	$('#sidebar_interviuri_contents').toggle();
}

function sidebar_concerte_toggle()
{
	$('#sidebar_concerte_closed').toggle();
	$('#sidebar_concerte_contents').toggle();
}

function sidebar_nworm_toggle()
{
	$('#sidebar_nworm_closed').toggle();
	$('#sidebar_nworm_contents').toggle();
}

function sidebar_metalfans_toggle()
{
	$('#sidebar_metalfans_closed').toggle();
	$('#sidebar_metalfans_contents').toggle();
}



/* -------------------------------- */

function complete_models(id){
	
	set_action_model("/masini/fabricant/"+id);
	
	var elment_id="model";
	elem = document.getElementById(elment_id);
	elem.disabled = false;
	elem.innerHTML="";

			
				oOption = '';
				
				oOption = document.createElement("OPTION");
				oOption.text="Toate modelele";
				oOption.value="0";
				try {
				   elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
				   elem.add(oOption); // IE only
				}	
				
	$.getJSON("/get_models_"+id+"?have="+action_for, function(data) { 
		var i=0;
		$.each(data, function(i,item){			
				oOption = document.createElement("OPTION");
				oOption.text=item.model;
				oOption.value=item.slug;
				
				
				try {
					elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
					elem.add(oOption); // IE only
				}			
		});								 
	});

}

function check_model(val){
	if(val==0)
		val = "/masini/fabricant/"+document.car_finder.manufacturer[document.car_finder.manufacturer.selectedIndex].value
	else
		val = action_value+val;
	
	set_action_model(val);			
}

function set_action_model(act){
	document.car_finder.action = act;		
}
/* -------------------- second hand */

/* -------------------- mobile.ro homepage */
var selected_item='';
function complete_mobilero_models(id,selected_item){
	
	if(selected_item==undefined || selected_item=='')
		selected_item=0;
	
	if(selected_item=="0")
		set_action_mobilero_model("/masini/fabricant/"+id);
	
	var elment_id="mobilero_model";
	elem = document.getElementById(elment_id);
	elem.disabled = false;
	elem.innerHTML="";

			
	oOption = '';
				
		/*
		oOption = document.createElement("OPTION");
		oOption.text="Toate modelele";
		oOption.value="0";
		try {
		   elem.add(oOption, null); // standards compliant; doesn't work in IE
		}
		catch(ex) {
		   elem.add(oOption); // IE only
		}	
		*/
				
	$.getJSON("/get_models_"+id, function(data) { 
		var i=0;		
		$.each(data, function(i,item){			

				if( !selected_item && item.slug ){
					selected_item = item.slug;
				}
				
					
					
				oOption = document.createElement("OPTION");
				oOption.text=item.model;
				oOption.value=item.slug;
				
				if(selected_item==item.slug){
					oOption.selected =true;
				}
				
				try {
					elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
					elem.add(oOption); // IE only
				}
								
		});		
		
		if( selected_item )
			set_action_mobilero_model("/masini/second_hand/"+selected_item);
		
	});
	
	
	//console.log("ajunge selected_item: "+selected_item);	
	//	mobilero_model
	

		
}

function check_mobilero_model(val){
	if(val==0)
		val = "/masini/fabricant/"+document.mobilero_finder.mobilero_manufacturer[document.mobilero_finder.mobilero_manufacturer.selectedIndex].value
	else
		val = "/masini/second_hand/"+val;
	
	set_action_mobilero_model(val);			
}

function set_action_mobilero_model(act){
	document.mobilero_finder.action = act;		
}
function set_price_action_mobilero_model(){
	act="";
	var min_price = document.mobilero_finder.MinPrice[document.mobilero_finder.MinPrice.selectedIndex].value;
	var max_price = document.mobilero_finder.MaxPrice[document.mobilero_finder.MaxPrice.selectedIndex].value;
	
	if(min_price){act+="&MinPrice="+min_price;}
	if(max_price){act+="&MaxPrice="+max_price;}
	
	document.mobilero_finder.action = document.mobilero_finder.action+"?"+act;
}
/* -------------------- mobile.ro homepage */



function complete_second_hand_models(id){
	
	set_second_hand_model("/masini/fabricant/"+id,"/masini/fabricant/"+id);
	
	var elment_id="model";
	elem = document.getElementById(elment_id);
	elem.disabled = false;
	elem.innerHTML="";

			
				oOption = '';
				
				oOption = document.createElement("OPTION");
				oOption.text="Toate modelele";
				oOption.value="0";
				try {
				   elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
				   elem.add(oOption); // IE only
				}	
				
	$.getJSON("/get_models_"+id, function(data) { 
		var i=0;
		$.each(data, function(i,item){			
				oOption = document.createElement("OPTION");
				oOption.text=item.model;
				oOption.value=item.slug;
				
				
				try {
					elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
					elem.add(oOption); // IE only
				}			
		});								 
	});

}

function check_second_hand_model(val){
	if(val==0)
	{
		val_mobilero = val_tg = "/masini/fabricant/"+document.car_finder.manufacturer[document.car_finder.manufacturer.selectedIndex].value;
	}else
		{
			val_tg = "/masini/verdict/"+val;
			val_mobilero = "/masini/second_hand/"+val;
		}
		
	set_second_hand_model(val_tg,val_mobilero);			
}

function set_second_hand_model(val_tg,val_mobilero){
	document.car_finder.action = val_tg;		
	$("#car-review-search").attr("href",val_tg);
	$("#car-second-search").attr("href",val_mobilero);	
}
/* second hand -------------------- */

/* -------------------- 2 way to find a car */
var slug_manufacturer="";
function complete_way_models(id){
	
	set_way_model("/masini/fabricant/"+id,"/masini/fabricant/"+id);
	
	var elment_id="way_model";
	elem = document.getElementById(elment_id);
	elem.disabled = false;
	elem.innerHTML="";

			
				oOption = '';
				
				oOption = document.createElement("OPTION");
				oOption.text="Toate modelele";
				oOption.value="0";
				try {
				   elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
				   elem.add(oOption); // IE only
				}	
				
	$.getJSON("/get_models_"+id, function(data) { 
		var i=0;
		$.each(data, function(i,item){			
				oOption = document.createElement("OPTION");
				oOption.text=item.model;
				oOption.value=item.slug;
				slug_manufacturer = item.slug_manufacturer;
				
				try {
					elem.add(oOption, null); // standards compliant; doesn't work in IE
				}
				catch(ex) {
					elem.add(oOption); // IE only
				}			
		});								 
	});

}

function check_way_model(val){
	if(val==0)
	{
		val_way = "/masini/fabricant/"+document.WayForm.way_manufacturer[document.WayForm.way_manufacturer.selectedIndex].value;
	}else
		{
			val_way = "/masini/home/"+slug_manufacturer+"/"+val;
		}
		
	set_way_model(val_way);			
}

function set_way_model(val_way){
	document.WayForm.action = val_way;		
}
/* 2 way to find a car -------------------- */



/* -------------------- comments */
var remove=false;

function get_remove(){
	var all_form = $("form#comment-form form-textarea comment-alert *");

	all_form.mouseout(function(data){ 
		remove=false;						
	});
	
	all_form.mouseover(function(data){ 
		remove=false;						
	});
	return remove;
}

function sanitize_comment_form(islogin){
	if(islogin)
		return true;
	
	var textarea =$("form#comment-form textarea");
	var container = $(".form-textarea");
	var calert_id = $("#comment-container-alert");
	var calert = $('<div id="comment-alert"><a href="/login.html">Login</a> sau <a href="/register.html">Register</a> pentru a posta un comentariu!</div>');
											
	textarea.mouseover(function() {
		if(!document.getElementById("comment-alert")){
			container.append(calert);
			textarea.css({opacity:0.5});	

				var offset = textarea.offset();

				var alert_width = (textarea.width()-40);
				var alert_left = offset.left+20;
				var alert_top = offset.top+10;
			
			$("#comment-alert").css({display:"block",opacity:1,width:alert_width});
								
		}else{
			remove=true;
		}							
	});
	textarea.mouseout(function() {
		remove = get_remove();

		if(remove){
			$("#comment-alert").remove();
			textarea.css({opacity:1});						

			remove=false;
		}	
	});
						
}



function FormFocus(obj) {
	if(obj.value==obj.defaultValue) obj.value='';
}
function FormBlur(obj) {
	if(obj.value=='') obj.value=obj.defaultValue;
}
function FormSubmit(form){
	  document.getElementById(form).submit(); return false;
}
function sure(msg){
	msg = (msg==undefined)?'Sunteti sigur?':msg;
	return confirm(msg)?true:false;
}


function OrderMobileRo(order){
	var loc = $("#mobilero_page").val();
	loc += (order!=undefined && order!="")?"&sort="+order:"";
	document.location.href = loc;
}

