function rOver(id,colour){
document.getElementById(id).style.backgroundColor=(colour);
}
function rOut(id,colour){
document.getElementById(id).style.backgroundColor=(colour);
}
function resizelocs() {
document.searchForm.loc.size = document.searchForm.loc.length + 1;
}
function MM_jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function YYcalclose(YYwhat){
  if (YYwhat>=0){
    var yyTag = YYwhat - yyW + 2;
    if ((yyTag > 0)&&(yyTag <= dom[yyDiv.m])){
      var d=yyTag;
      if (YYLang=='de'){YYstrdatum = d+'.'+eval(yyDiv.m+1)+'.'+yyDiv.year;} //13.4.1968
      if (YYLang=='com'){YYstrdatum = YYstrm[yyDiv.m].substring(0,3) +' '+d+', '+yyDiv.year;}
      if (YYLang=='av'){YYstrdatum = d+'/'+YYstrm[yyDiv.m].substring(0,3)+'/'+yyDiv.year;}
      YYTest= yyDatevar + " = '" + YYstrdatum+"'";
      eval(YYTest);
    }
  }
  if (document.layers){yyDiv.visibility = "hide";}
  if (document.all){yyDiv.style.visibility = "hidden";}
}

function YYgoYear(YY){
  var newYear = eval(yyDiv.year) + YY;
  yyDiv.year = newYear.toString(10);
  if (YY==0){} else {YYsetMonth(yyDiv.m,yyDiv.year)}
  setTimeout('YYcaldraw(yyDiv.d,yyDiv.m,yyDiv.year)','300');
}

function YYsetMonth(YYm, YYy){
  var startDate = new Date();
  startDate.setMonth(YYm);   startDate.setYear(YYy);   startDate.setDate(1);
  yyW = startDate.getDay();
  if (yyW==0){yyW=7}
  var daSchalt = yyDiv.year % 4;
  if (daSchalt==0){dom[1]=29}else {dom[1]=28}
}

function YYgoMonth(YY){
   yyDiv.m=yyDiv.m+YY;
   if (yyDiv.m<0){yyDiv.m+=12;YYgoYear(-1)}
     else {if (yyDiv.m>11){yyDiv.m=yyDiv.m-12;YYgoYear(1)}
       else{setTimeout('YYcaldraw(yyDiv.d,yyDiv.m,yyDiv.year)','200')}
     }
   YYsetMonth(yyDiv.m,yyDiv.year);
}

function YYsetDate(){
   if (document.layers){yyDiv=document.layers['Calendar1']}
   else{        if (document.all){yyDiv=document.all['Calendar1']}}
   var myDate = new Date();
   yyDiv.year=myDate.getYear();
   if ((myDate.getYear() > 86)&&(myDate.getYear() <= 99)) { yyDiv.year= '19' + myDate.getYear() }
   if ((myDate.getYear() > 99)&&(myDate.getYear() < 1900)) { yyDiv.year= (1900 + myDate.getYear())+''; }
   if (myDate.getYear() <= 86){ yyDiv.year= '20' + myDate.getYear() }//2000!!
   yyDiv.m =  myDate.getMonth();
   yyDiv.d = myDate.getDate();
   var w = myDate.getDay();
   YYsetMonth(yyDiv.m,yyDiv.year);
   YYgoYear(0);
}

function YYcaldraw(ycd,ycm,ycy){  // writing the calendar table
  yyfnt="<font size=1 color='"+yyDiv.yyTextcolor+"' face=\'verdana\'>";
  yyatag="<a href='#' style=\"color: "+yyDiv.yyTextcolor+"; text-decoration: none\" onClick=";
  if ((document.layers) || (document.all)){
   yyietxt="<table border=\'1\' bgcolor=\'"+yyDiv.yyBgcolor+"\' cellspacing=\'0\' cellpadding=\'0\' width=\'170\' bordercolor=\'white\' bordercolordark=\'white\'>";
   yyietxt+="<tr><td colspan='7'>"+yyfnt+yyatag+"'YYgoMonth(-1)'>&lt;&nbsp;</a>";
   yyietxt+=YYstrm[ycm];
   yyietxt+=yyatag+"'YYgoMonth(1)'>&nbsp;&gt;</a>&nbsp;&nbsp;&nbsp;";
   yyietxt+=yyatag+"'YYgoYear(-1)'>&lt;&nbsp;</a>&nbsp;"+ycy+"&nbsp;";
   yyietxt+=yyatag+"'YYgoYear(1)'>&nbsp;&gt;</a>&nbsp;&nbsp;&nbsp;";
   yyietxt+=yyatag+"'YYcalclose()'>x</a></font></td>";
   yyietxt+="</tr><tr>";
   yyietxt+="<td align=center>"+yyfnt+"MO</font></td><td align=center>"+yyfnt+"TU</font></td><td>"+yyfnt+"WE</font></td><td align=center>"+yyfnt+"TH</font></td>";
   yyietxt+="<td align=center>"+yyfnt+"FR</font></td><td align=center>"+yyfnt+"SA</font></td><td align=center>"+yyfnt+"<font color=red>SU</font></font></td>";
   yyietxt+="</tr><tr>";
   for (i=0;i<=41;i++){
     myStr=((i > (dom[ycm]+yyW-2))||(i < yyW-1))?"&nbsp;":i-yyW+2;
     yyietxt+="<td align=center>"+yyfnt+yyatag+"\'YYcalclose("+i+")\'>"+
     myStr + "</a></font></td>";
     if ((i==6) || (i==13) || (i==20) || (i==27) || (i==34) || (i==41)) { yyietxt+="<tr>" }
   }
   yyietxt+="</table>";
 }
 if (document.layers){
   with (yyDiv.document){
     open('text/html');
     write(yyietxt);
     close();
   }
 }  // end of ns4
 if (document.all){
   document.all['Calendar1'].innerHTML=yyietxt;
 } // end of ie4x
}

function YY_Calendar(YYwhat,YYleft, YYtop,YYformat, YYtextcolor, YYbgcolor){//v3.01
  YYsetDate();
  yyDiv.yyTextcolor = YYtextcolor;
  yyDiv.yyBgcolor = YYbgcolor;
  if (document.layers){
    yyDiv.left = YYleft;
    yyDiv.top = YYtop;
    yyDiv.visibility ="show";
  }
  if (document.all){
    yyDiv.style.pixelLeft = YYleft;
    yyDiv.style.pixelTop = YYtop;
    yyDiv.style.visibility = "visible";
    eval("YYwhat=YYwhat.replace(/.layers/gi, '.all')");
  }
  yyDatevar = YYwhat;
  YYLang=YYformat;
}



function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}






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 checkCR(evt) {
    var evt  = (evt) ? evt : ((event) ? event : null);
    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}
document.onkeypress = checkCR;
  
function checkPw(form) {
pw1 = form1.newpin.value;
pw2 = form1.newpin2.value;
if (pw1 != pw2) {
	alert ("\nYou did not enter the same new password twice. Please re-enter your password.")
	return false;
}
	else return true;
}
function toggleDiv( targetId ){
if (document.getElementById){
target = document.getElementById( targetId );
if (target.style.display == "none"){
target.style.display = "";
} else {
target.style.display = "none";
}
}
}

