function menu(from,to){ var re=new RegExp('_'+from+'.htm','i');var url=document.location.href.replace(re,'_'+to+'.htm');re=new RegExp('/'+from+'/','i');url=url.replace(re,'/'+to+'/');document.location=url}
function demo(lang,key){
 var w=800;var h=700; 
 switch(key.toLowerCase()){
  case 'esmt':
  url='http://www.sts.ch/smt-demo.htm'
  break
  case 'rd':
  url='http://www.sts.ch/video/tourSMT_'+lang+'/Guided_tour_smt.htm'
  break
  case 'pm':
  url='http://www.sts.ch/el123/default.htm'
  break
  case 'leader':
  url='http://217.193.151.36/4daction/websys_login/Leadership_'+lang+'.shtm';
  break
  case 'risk':
  url='http://217.193.151.36/4daction/websys_login/Syberrisk_'+lang+'.shtm';
  break
  case 'assesspm':
  url='http://www.sts.ch/assessment/default_'+lang+".htm"
  break
  default:
  url='';
 }
 demoWin=window.open(url,'demoWin','resizable=yes,left='+Math.round(screen.availWidth/2-w/2)+',top='+Math.round(screen.availHeight/2-h/2)+',scrollbars=yes,width='+w+',height='+h); //demoWin.focus()
}
function open_win_video(){open ("../video/video.htm", "videoWin","fullscreen=no,menubar=no,scrollbars=no,scrolling=no,resizable=no,top=100,left=100,width=500,height=350,screenX=0,screenY=0" )}
function test(aForm,msg){
 for(var i=0;i<aForm.length;i++) with(aForm.elements[i])
 if((type=='text'&&(value==''||value==' '))||(type=='select-one'&&options.selectedIndex==-1)){alert(msg);focus();return false}
 return true;
}
function OpenWin(w,h,url,isScroll){
 if(window.popupWin && !popupWin.closed) popupWin.close();
 var scrollStr=(isScroll)? 'yes' : 'no';
 popupWin=window.open(url,'popupWin','left='+Math.round(screen.availWidth/2-w/2)+',top='+Math.round(screen.availHeight/2-h/2)+',scrollbars='+scrollStr+',width='+w+',height='+h);
 popupWin.focus();return false
}