
function open_win(win)
{
window.open(win,"_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=400, height=400")
}

//Change style in mouse over
function mouseIn(ele){ 
 chgStyle(ele,'#000000','#3399ff') 
}
//change style on mouse out
function mouseOut(ele){
 chgStyle(ele,'#ffffff','#000099')
}
//Change style in mouse over
function mouseInSub(ele){ 
 chgStyle(ele,'#ffffff','#6E70DD') 
}
//change style on mouse out
function mouseOutSub(ele){
 chgStyle(ele,'#000000','#AAAAD4')
}


//Change the text colour and background colour of an element - note that the style 
//properties are javascript- not CSS
		function chgStyle(element,col,bgcol){  		 
		 if(document.getElementById){
		 try{ 	     
		  document.getElementById(element).style.color = col;
		//	document.getElementById(element).style.backgroundColor = bgcol;
			//document.getElementById(element).style.borderBottomColor = bgcol;
			
			
			
			}
			catch(e){alert("error is : " +e)}
		 }
		}

 /**/

function showmenu(elmnt)
{
hidemenu()
if(elmnt!==""){
    var v_regexp = new RegExp(elmnt,"gi")
    for ( var i = 0; i < submenus.length; i++ ) {
         if ( v_regexp.test(submenus[i]) ) {
               // Pattern found
    					
             document.getElementById(submenudiv).style.display="block"
         }
    }
}
document.getElementById(elmnt).style.display="block"

}
//Hide an element
function hidemenu()
{
  for (i=0;i<submenus.length;i++)
    {		
		 j =  submenus[i] 			
		 document.getElementById(j).style.display="none"
    }  
	document.getElementById(submenudiv).style.display="none" 	
}
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
