function extlnkfnc() {
	with (location.href) if (indexOf('?')>=0) {
		var l=slice(indexOf('?')+1,length);
		qaOn(l);
		window.location.href="#assay"+l;
	}
}	

var element0, class0;
function chg_cls(elementid) {
  if (elementid) {
    element0 = elementid;
    with (element0) {
      class0 = attributes['class'].value;
      attributes['class'].value = class0 + 'Over';
    }
  } else {	
    element0.attributes['class'].value = class0;		
  }
}

var m = 0;
function qaOn(n) {
  var aa = 'q'+n+'a', qq = 'q'+n;
  if (n == m) {
    document.getElementById(aa).style.display = 'none';
    document.getElementById(qq).title = 'click to open';
    m = 0;
  } else {
  if (m != 0) {
      document.getElementById('q'+m+'a').style.display = 'none';
      document.getElementById('q'+m).title = 'click to open';
    }
    document.getElementById(aa).style.display = '';
    document.getElementById(qq).title = 'click to close';
    m = n;
  }
}

function chkscr() {
  if (screen.height >=768) {
    MM_goToURL('parent','psoriasis_02.html');
    return document.MM_returnValue;
  } else {	
    window.open('movies/deadsea01.wmv','movieWin','HEIGHT=320,WIDTH=290');
  }
}
//---------------------strings for alerts//
//  0=English
//  1= German
//  2= Italian
//  3= Danish
//  4= Russian
var en=0;
var de=1;
var it=2;
var da=3;
var ru=4;
 var noNameAlert = new Array(3);
	noNameAlert[0] = "NOTE: please enter your full name";
	noNameAlert[1] = "ANMERKUNG: tragen Sie bitte Ihren vollen Namen ein";
	noNameAlert[2] = "NOTA: introduca prego il vostro nome completo";
	noNameAlert[3] = "BEMÆRK: indtast dit fulde navn";
	noNameAlert[4] = "\u041F\u0420\u0418\u041C\u0415\u0427\u0410\u041D\u0418\u0415: \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0435 \u043F\u043E\u043B\u043D\u043E\u0435 \u0438\u043C\u044F";

 var notValidEmailAlert = new Array(3);
	notValidEmailAlert[0] = "NOTE: please enter a valid E-mail address";
	notValidEmailAlert[1] = "ANMERKUNG: tragen Sie bitte eine g\u00FCltige E-mail Adresse ein";
	notValidEmailAlert[2] = "NOTA: entri prego in un indirizzo valido di E-mail";
	notValidEmailAlert[3] = "BEMÆRK: indtast en gyldig e-mailadresse";
	notValidEmailAlert[4] = "\u041F\u0420\u0418\u041C\u0415\u0427\u0410\u041D\u0418\u0415: \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u044B";

//------------------------------------------
function validateForm(lang) {
i=parseInt(lang); 

  with (document.getElementById('nameField')) {
    if (value.indexOf('[') >= 0 || value.indexOf(' ') < 1 || value.indexOf(' ') == value.length - 1) {
      alert(noNameAlert[i]);
    } else with (document.getElementById('mailField').value) {
      if (indexOf('@') < 1 || indexOf('@') == length - 1 || indexOf('.') < 1 || indexOf('.') == length - 1) {
//alert(lang);
      alert(notValidEmailAlert[i]);
      } else {
        //document.getElementById('formSpan').style.display = 'none';
        //document.getElementById('ackSpan').style.display = '';
        document.regForm.submit();		
      }
    }
  }
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
