/* Menus dynamiques */
dmenu_timeout = false;
dmenu_menu_affiches = new Array();
dmenu_menu_affiches['n2'] = false;
dmenu_menu_affiches['n3'] = false;

/* Variables pour fontsizer */
var minSize = -5;
var maxSize = 5;
var initSize = 0; // Array position of inital px size
var enTraitement = false;

/* Variable qui sert à déterminer les tinyMCE initialisé dans un thickbox*/
var tinyMCE_thickbox = tinyMCE_thickbox || {};

function Imprimer(PageDlg)
{
	var Win;
		
	Win=window.open(PageDlg,"PageImpression","Width=800,Height=540,location=no,adressbar=no,toolbar=no,directories=no,menubar=yes,status=no,resizable=no,scrollbars=yes,left=20,top=20");

	if(Win.opener == null) 
		Win.opener = window;
	
	Win.focus();
}

function ImprimerDiv(PageDlg)
{
	var Win;
		
	Win=window.open(PageDlg,"PageImpression","Width=595,Height=540,location=no,adressbar=no,toolbar=no,directories=no,menubar=yes,status=no,resizable=no,scrollbars=yes,left=20,top=20");

	if(Win.opener == null) 
		Win.opener = window;
	
	Win.focus();
}

function OPG(PageDlg,TitreDlg)
{
	OPC(PageDlg, TitreDlg, 650, 440, 75, 75);
}
	
function OP(PageDlg,TitreDlg)
{
	OPC(PageDlg, TitreDlg, 800, 540, 75, 75);
}

function OuvrirPage(PageDlg,TitreDlg)
{
	OP(PageDlg, TitreDlg);
}

function OP1024(PageDlg,TitreDlg)
{
	OPC(PageDlg, TitreDlg, "980", "500", "20", "20");
}

function OPC(PageDlg, TitreDlg, width, height, left, top)
{
	var win = window.open(PageDlg,TitreDlg,"Width=" + width + ",Height=" + height + ",toolbar=no,directories=no,menubar=no,status=no,resizable=yes,scrollbars=yes,left=" + left + ",top=" + top);
	
	if(win.opener == null) 
		win.opener = window;
	
	win.focus();
}

function bouton_submit(bouton)
{
	bouton.disabled=true;
	if(document.getElementById)
	{
		document.getElementById(bouton.id).className = "boutonDisable";
		setTimeout("waiting('"+bouton.id+"',0)",500);
	}
}

function td_over(elem, couleur_over, id_div_action)
{
	old_c=elem.style.backgroundColor;
	elem.style.backgroundColor=couleur_over;
	if(id_div_action!='')
		document.getElementById(id_div_action).className='div-action-over';
}

function td_out(elem, id_div_action)
{
	elem.style.backgroundColor=old_c;
	if(id_div_action!='')
		document.getElementById(id_div_action).className='div-action';
}

function waiting(id_bouton, nb)
{
	label_bouton="Patientez.";
	for(i=0;i<nb%5;i++)
		label_bouton+=".";
	for(i=0;i<5-(nb%5);i++)
		label_bouton+=" ";
	document.getElementById(id_bouton).value = label_bouton;
	nb++;
	setTimeout("waiting('"+id_bouton+"',"+nb+")", 500);
}

function montrerDiv(idDiv)
{
	document.getElementById(idDiv).style.display = 'block';	
}

/* Menus dynamiques */
function dmenu_cacher_tout(menu, niveau)
{
	if(dmenu_menu_affiches['n2']!=false && dmenu_menu_affiches['n2']!=menu)
		dmenu_cacher_to(dmenu_menu_affiches['n2'], 'n2');
	
	if(dmenu_menu_affiches['n3']!=false && dmenu_menu_affiches['n3']!=menu)
	{
		//cacher le n3 seulement si ce n'est pas son enfant
		id_menu_parent = dmenu_menu_affiches['n3'];
		menu_parent = id_menu_parent.substring(0, id_menu_parent.lastIndexOf("_"));
		if(menu_parent!=menu)
			dmenu_cacher_to(dmenu_menu_affiches['n3'], niveau);
	}
}

function dmenu_afficher(menu, niveau)
{
	dmenu_cacher_tout(menu, niveau);
	
	//Afficher le menu en cours
	dmenu_afficher_to(menu, niveau);
	if(niveau=="n3")
	{
		menu_parent = menu.substring(0, menu.lastIndexOf("_"));
		dmenu_afficher_to(menu_parent, "n2");
	}
}

function dmenu_afficher_to(menu, niveau)
{
	document.getElementById(menu).style.visibility = "visible";
	dmenu_menu_affiches[niveau] = menu;
	dmenu_arret_to();
}

function dmenu_cacher(menu, niveau)
{
	dmenu_timeout = true;
	dmenu_to = setTimeout("dmenu_cacher_to('"+menu+"', '"+niveau+"')", 500);
}

function dmenu_cacher_to(menu, niveau)
{
	document.getElementById(menu).style.visibility = "hidden";
	dmenu_menu_affiches[niveau] = false;
	if(niveau=="n3")
	{
		menu_parent = menu.substring(0, menu.lastIndexOf("_"));
		dmenu_cacher_to(menu_parent, "n2");
	}
}

function dmenu_arret_to()
{
	if(dmenu_timeout)
	{
		clearTimeout(dmenu_to);
		dmenu_timeout = false;
	}
}

function rte_lire_plus(bp_id, plus)
{
	var objCtrlPlus = document.getElementById("bp_ctrl_p_"+bp_id);
	var objCtrlMoins = document.getElementById("bp_ctrl_m_"+bp_id);
	var objResume = document.getElementById("bp_resume_"+bp_id);
	var objTexte = document.getElementById("bp_texte_"+bp_id);

	if(plus)
	{
		objCtrlPlus.style.display = "none";
		objResume.style.display = "none";
		objCtrlMoins.style.display = "inline";
		objTexte.style.display = "inline";
	}
	else
	{
		objCtrlPlus.style.display = "inline";
		objResume.style.display = "inline";
		objCtrlMoins.style.display = "none";
		objTexte.style.display = "none";
	}
}

function boitePlus(id_boite, afficher)
{
	if(afficher==true)
	{
		document.getElementById('boite_plus_resume_'+id_boite).style.display='none';
		document.getElementById('boite_plus_complet_'+id_boite).style.display='block';
	}
	else
	{
		document.getElementById('boite_plus_complet_'+id_boite).style.display='none';
		document.getElementById('boite_plus_resume_'+id_boite).style.display='block';
	}
}

function change_bloc(id_bloc)
{
	var id_contenu = id_bloc + '__bloc';
	var bloc = document.getElementById(id_contenu);
	var bloc_controle_moins = document.getElementById(id_contenu + '_controle_moins');
	var bloc_controle_plus = document.getElementById(id_contenu + '_controle_plus');
	
	if(bloc && bloc_controle_moins && bloc_controle_plus)
	{
		if(bloc.style.display == 'none')
		{
			bloc.style.display = 'block';
			bloc_controle_moins.style.display = 'block';
			bloc_controle_plus.style.display = 'none';
		}
		else
		{
			bloc.style.display = 'none';
			bloc_controle_moins.style.display = 'none';
			bloc_controle_plus.style.display = 'block';
		}
	}
		
}

function onEnterPressed(e, nom_fonction)
{
	var keyID;
	var keyIsOK = true;

	if(!e) var e = window.event;

	if(e.keyCode)
		keyID = e.keyCode;
	else if(e.which)
		keyID = e.which;

	if(keyID==13) //Enter
	{
		keyIsOK = false;
		eval(nom_fonction);
	}

	return keyIsOK;
}

//cocher : true/false
function tout_cocher(nom_formulaire, nom_checkbox, cocher)
{
	objCheckbox = document.forms[nom_formulaire].elements[nom_checkbox+"[]"];
	if(objCheckbox)
	{
		if(objCheckbox.length)
		{
			for(i=0; i<objCheckbox.length; i++)
			{
				objCheckbox[i].checked=cocher;
			}
		}
		else
			objCheckbox.checked=cocher;
	}
}

function tout_cocher_selecteur(selecteur, cocher)
{
	$(selecteur).each(function()
	{
		if(this.checked != cocher)
		{
			this.checked = cocher;

			if(this.onclick)
				this.onclick();
		}
	});
}

/* fontsizer.js */

function fontSizer(inc) {
	if (!document.getElementById) return;
	
	var size = readCookie('size');
	size = parseInt(inc)+parseInt(size);
	if (size < minSize ) 
	{
		size = minSize;
		inc = 0;
	}
	if (size > maxSize )
	{
		size = maxSize;
		inc = 0;
	}
	
	changerTaillePolice(inc);
	createCookie("size", size, 365);
}

function fontSizerOnLoad(preferredSize) {	
	if (!document.getElementById) return;
	
	//var size = readCookie('size');
	if (preferredSize < minSize ) { preferredSize = minSize; }	
	if (preferredSize > maxSize ) { preferredSize = maxSize; }
	
	changerTaillePolice(preferredSize);
}

function normalSize() {
	if (!document.getElementById) return;
	
	var size = readCookie('size');

	//Inverser la modification...
	size = size * -1;
	
	changerTaillePolice(size);
	createCookie("size", 0, 365);
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "expires="+date.toGMTString();
	}
	else {
		expires = "";
	}
	document.cookie = name+'='+value+'; '+expires+'; path=/';
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' '){ 
			c = c.substring(1,c.length);
		}
		if (c.indexOf(nameEQ) == 0) {
			return c.substring(nameEQ.length,c.length);
		}
	}
	return initSize;
}

function changerTaillePolice(nTaille)
{
	if (enTraitement) return;

	if (!document.styleSheets) return;

	enTraitement = true;

	for(j=0; j<document.styleSheets.length; j++)
	{
		var theRules = new Array();
		if (document.styleSheets[j].cssRules)
			theRules = document.styleSheets[j].cssRules
		else if (document.styleSheets[j].rules)
			theRules = document.styleSheets[j].rules
		
		nbRegles = theRules.length;
		for(i=0; i<nbRegles; i++)
		{
			if(theRules[i].style)
			{
				tailleActuelle = theRules[i].style.fontSize;
				
				if(tailleActuelle != "" && tailleActuelle != null && tailleActuelle.indexOf('px') != -1)
				{
					nouvelleTaille = parseInt(tailleActuelle) + parseInt(nTaille);

					if(nouvelleTaille > 0)
						theRules[i].style.fontSize = nouvelleTaille + "px";
				}
			}
		}
	}

	enTraitement = false;
}

//Pour simplifier l'utilisation des tableaux en javascript...
function in_array(tableau, obj) {
	var len = tableau.length;
	for ( var x = 0 ; x < len ; x++ ) {
		if ( tableau[x] == obj ) return true;
	}
	return false;
}

//Pour rendre indexOf pour un array dans IE
if(!Array.indexOf)
{
	Array.prototype.indexOf = function(obj)
	{
		for(var i = 0; i < this.length; i++)
		{
	  	if(this[i] == obj)
	   		return i;
	  }
	  
	  return -1;
	}
}

function switch_contenu_with_fade(obj1, obj2, params)
{
	var params_default = {texte: true, fct: false}
	var params = jQuery.extend(params_default, params);
	
	//if(params.texte && jQuery.browser.msie && jQuery.browser.version.substring(0, 1) == '6')
	if(params.texte && jQuery.browser.msie)
	{
		obj1.innerHTML = obj2.innerHTML;
		
		if(jQuery.isFunction(params.fct))
			params.fct();
	}
	else
	{
		$(obj1).fadeTo('normal', 0, function()
		{
			obj1.innerHTML = obj2.innerHTML;
			$(obj1).fadeTo('normal', 1, function()
			{
				if(jQuery.browser.msie)
					this.style.removeAttribute('filter');
			});
			
			if(jQuery.isFunction(params.fct))
				params.fct();
		});
	}
}


// var globale pour switch_contenu_with_fade_and_display
function fade_and_display(obj1, obj2, params, fct_fadeIn)
{
	var params_default = {texte: true, fct: false}
	var params = jQuery.extend(params_default, params);

	$(obj1).fadeOut('normal', function()
														{
															if(jQuery.isFunction(fct_fadeIn))
																$(obj2).fadeIn('normal', fct_fadeIn);
															else
																$(obj2).fadeIn('normal');
															
															if(jQuery.isFunction(params.fct))
																params.fct();
														});
}

function change_innerHTML_with_fade(obj, innerHTML)
{
	if(obj.innerHTML == '')
	{
		obj.innerHTML = innerHTML;
		$(obj).slideDown('fast');
	}
	else
	{
		if(jQuery.browser.msie && jQuery.browser.version.substring(0, 1) == '6')
			obj.innerHTML = innerHTML;
		else
		{
			$(obj).fadeOut('fast', function()
			{
				obj.innerHTML = innerHTML;
				$(obj).fadeIn('fast', function()
				{
					if(jQuery.browser.msie)
						this.style.removeAttribute('filter');
				});
			});
		}
	}
}

function bouton_image_toogle_disabled(obj, src, disabled_param)
{
	if(obj)
	{
		var disabled = (disabled_param != undefined) ? disabled_param : !obj.disabled;
		
		obj.disabled = disabled;
		
		var none = $(obj).css('display') == 'none';
		$(obj).fadeTo(0, ((disabled) ? 0.5 : 1));
		if(none)
			$(obj).css('display', 'none');
		
		if(src)
			obj.src = src;
	}
}

function toggle_change_perso()
{
	$('.ico-change-perso').each(function()
	{
		this.style.display = (this.style.display == 'none') ? 'inline' : 'none';
	});
}

var oldLayer = null;

function showLayerDebug(id_layer)
{
	eval("if(window."+id_layer+"_timeout) clearTimeout(window."+id_layer+"_timeout);");
	document.getElementById(id_layer).style.visibility='visible';

	if(oldLayer!=null && oldLayer!=id_layer)
	{
		eval("if(window."+oldLayer+"_timeout) clearTimeout(window."+oldLayer+"_timeout);");
		document.getElementById(oldLayer).style.visibility='hidden';
	}

	oldLayer = id_layer;
}

function hideLayerDebug(id_layer, timeout)
{
	if(timeout)
	{
		eval("if(window."+id_layer+"_timeout) clearTimeout(window."+id_layer+"_timeout);");
		eval("window."+id_layer+"_timeout = setTimeout(\"document.getElementById('"+id_layer+"').style.visibility='hidden';\", timeout);");
	}
	else
	{
		document.getElementById(id_layer).style.visibility='hidden';
	}
}

function reload_parent()
{
	window.opener.document.location.reload(true);
}

textePopup = new Array(10);
function ajouterTextePopup(idTexte, texte)
{
	textePopup[idTexte] = texte;
}

function afficherBoitePopup(idTexte, largeur, event)
{
	if(textePopup[idTexte]!="")
	{
		document.getElementById("boitepopup").innerHTML=textePopup[idTexte];
		
		if(!document.all)
		{
			posX = event.pageX;
			posY = event.pageY;
		}
		else
		{
			posX = document.body.scrollLeft + event.clientX;
			posY = document.body.scrollTop + event.clientY;
		}
		
		largeurPage = document.body.clientWidth;
		
		if(largeurPage && parseInt(posX)+parseInt(largeur) > largeurPage)
		{
			posX = largeurPage-largeur-25;
		}
		
		document.getElementById("boitepopup").style.width = largeur;
		document.getElementById("boitepopup").style.left = posX+"px";
		document.getElementById("boitepopup").style.top = (posY+20)+"px";
			
		document.getElementById("boitepopup").style.visibility="visible";
	}
}

function cacherBoitePopup()
{
	document.getElementById("boitepopup").style.visibility="hidden";
}

function toggle_div(id, afficher_uniquement, toggle_image, slide)
{
	afficher_uniquement = afficher_uniquement || false;

	var obj = document.getElementById(id);
	
	if(obj && (afficher_uniquement==false || obj.style.display=='none'))
	{
		if(toggle_image)
		{
			var img = document.getElementById(id+"_img");
			if($(obj).css('display')=='none')
				img.src = img.src.replace("ouvrir", "fermer");
			else
				img.src = img.src.replace("fermer", "ouvrir");
		}
		if(slide)
			$(obj).slideToggle('normal');
		else
		$(obj).toggle('normal');
	}
}


function strip_accent(s)
{						
	var r = '';
	
	if(s)
	{
		var s_avec_accent = 'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ';
		var s_sans_accent = 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy';
		
		for(var i = 0; i < s.length; i++)
		{
			var pos = s_avec_accent.indexOf(s[i]);
			
			if(pos != -1)
				r += s_sans_accent[pos];
			else
				r += s[i];
		}
	}
	
	return r;
}

function scroll_to(selector)
{
	if($(selector).offset())
	{
		var page = 'html, body';
		if(jQuery.browser.opera)
			page = 'html';
			
		var selector_scroll = page;
		var first_scrollable_parent = false;
		
		$(selector).parents().each(function()
		{
			if(!first_scrollable_parent && !$(this).hasClass('ui-accordion-content') && ($(this).css('overflow') == 'auto' || $(this).css('overflow') == 'scroll' || $(this).css('overflow-y') == 'auto' || $(this).css('overflow-y') == 'scroll'))
				first_scrollable_parent = this;
		});
		
		var top;
		if(first_scrollable_parent && $(first_scrollable_parent).offset())
		{
			top = $(selector).offset().top - $(first_scrollable_parent).offset().top + $(first_scrollable_parent).scrollTop();
			selector_scroll = first_scrollable_parent;
		}
		else
			top = $(selector).offset().top;
		
		if(top != undefined)
			$(selector_scroll).animate({scrollTop:top}, 'slow');
	}
}

function obj_gen_tr_hover_onfocus(obj)
{
	$(obj).parents('tr:first').each(function()
	{
		$(this).addClass('obj_gen_tr_hover');
	});
}

function obj_gen_tr_hover_onblur(obj)
{
	$(obj).parents('tr:first').each(function()
	{
		$(this).removeClass('obj_gen_tr_hover');
	});
}

function obj_gen_somme(no_questionnaire, id)
{
	var somme = 0;

	var fct_id = function()
	{
		if(s = parseFloat($(this).val().replace(',', '.')))
		{
			s = Math.abs(s);
			
			if($(this).hasClass('fct_id_penalite'))
				somme -= s;
			else
			somme += s;
		}
	};

	var fct_calcul = function()
	{
		$(this).val(somme);
		$(this).change();
	};

	$('.fct_id_somme_' + no_questionnaire + '_' + id).each(fct_id);
	$('.fct_calcul_somme_' + no_questionnaire + '_' + id).each(fct_calcul);
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function fct_sleep_while_condition(fct, fct_condition, ms)
{
	if(fct_condition())
	{
		setTimeout(function()
		{
			fct_sleep_while_condition(fct, fct_condition, ms);
		}, ms);
	}
	else
		fct();
}

function lien_sous_onglet(index)
{
	$('#obj_gen_sous_onglets').tabs("select" , index);
}

//http://www.quirksmode.org/js/detect.html
var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari",
			versionSearch: "Version"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			   string: navigator.userAgent,
			   subString: "iPhone",
			   identity: "iPhone/iPod"
	    },
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

function location_href_update_params(params)
{
	if(params && window.location.href)
	{
		var url_base = '';
		var url_get = '';
		var url_hash = '';
		
		var pos_get = window.location.href.indexOf('?');
		var pos_hash = window.location.href.indexOf('#');
		
		if(pos_get == -1 && pos_hash == -1)
			url_base = window.location.href;
		else
		{
			if(pos_get != -1 && pos_hash == -1)
			{
				url_base = window.location.href.substr(0, pos_get);
				url_get = window.location.href.substr(pos_get + 1);
			}
			else if(pos_get == -1 && pos_hash != -1)
			{
				url_base = window.location.href.substr(0, pos_hash);
				url_hash = window.location.href.substr(pos_hash + 1);
			}
			else
		{
				var pos_min = (pos_get < pos_hash) ? pos_get : pos_hash;
				url_base = window.location.href.substr(0, pos_min);
			
				if(pos_min == pos_get)
				{
					url_get = window.location.href.substr(pos_get + 1, pos_hash - pos_get - 1);
					url_hash = window.location.href.substr(pos_hash + 1);
				}
				else
				{
					url_get = window.location.href.substr(pos_get + 1);
					url_hash = window.location.href.substr(pos_hash + 1, pos_get - pos_hash - 1);
				}
			}
		}
		
		var url_get_params = {};
		if(url_get)
		{
			array_tmp = url_get.split('&');
			for(var i = 0; i < array_tmp.length; i++)
			{
				var array_tmp2 = array_tmp[i].split('=');
				
				var cle = array_tmp2[0];
				var value = '';
				if(array_tmp2.length == 2)
					value = array_tmp2[1];
					
				url_get_params[cle] = value;
			}
		}
		
		for(var cle in params)
			url_get_params[cle] = params[cle];
		
		var url_get_new = '';
		for(var cle in url_get_params)
		{
			if(url_get_new)
				url_get_new += '&';
				
			url_get_new += cle + '=' + url_get_params[cle];
		}
		
		var url_new = url_base;
		if(url_get_new)
			url_new += '?' + url_get_new;
		if(url_hash)
			url_new += '#' + url_hash;
			
		window.location.href = url_new;
		
		if(url_get == url_get_new)
			window.location.reload(true);	
	}
}
