	function  changelang() 
	{  
	var str = window.location.href;
	// cerca la stringa 'sor_en'
	var where = str.indexOf('_en');

	if (where != -1) { 
			where = where + 1;
	  var pre = str.substring(0,where);
	  // alert (pre)
	  var subs  = str.substring(where,where+3);
	  // alert (subs)
	  var post = str.substring(where+3,100);
	  // alert (post)
	  var nuovo = pre + 'it_' + post;
	  // alert (nuovo)
	  window.location.href = nuovo;
	  }
	  else  { 
	  where = str.indexOf('it');
	  var pre = str.substring(0,where);
	  // alert (pre)
	  var subs  = str.substring(where,where+3);
	  // alert (subs)
	  var post = str.substring(where+3,100);
	  // alert (post)
	  var nuovo = pre + 'en_' + post;
	  //alert (nuovo)
	  window.location.href = nuovo;
	  }
    } 
	
function  show_help() { 
   window.open('http://www.totemworks.it/help.htm','','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=400,height=200')
} 
	
function OpenDown(theURL) { //v2.0
  theURL = "http://www.totemworks.it/download.asp?ReqFile=" + theURL;
  myPop = window.open(theURL,'PopDown','toolbar=yes,status=yes,width=750,height=500');
  myPop.moveTo((screen.width/2)-(750/2),(screen.height/2)-(500/2));
  myPop.focus();
}

