/******inserire questa riga nelle JSP che devono utilizzare queste funzioni javascript**********
<script language="JavaScript" src="<cms:link>/benettontalk/admin/script.js</cms:link>"></script>
************************************************************************************************/


/***********richiamare in questo modo la funzione openUrl********************************
href="javascript:openUrl('http://www.google.com','<bnt:getproperty property='locale'/>')"

(togliere target="_blank" dalla tag html del link)
*****************************************************************************************/

function openUrl(url,locale) {


  if (locale == "it" ) {
    msg1="La pagina che sara' visualizzata e' esterna a questo sito.";
    msg2="Continuare?";
  } else if (locale == "en") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  } else if (locale == "fr") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  } else if (locale == "es") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  } else if (locale == "ar") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  } else if (locale == "ja") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  } else if (locale == "zh") {
    msg1="The page that is going to be viewed is outside this site.";
    msg2="Continue?";
  }  
  if (url.indexOf("benettontalk") == -1 ) {
	input_box=confirm(msg1+"\n"+msg2);
  } else {
	input_box=true;
  }

  if (input_box==true) {
	window.open(url,'','');
  } 
}

