// JavaScript Document
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();
}

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 hideAllLayers() {
	var i;
	for(i=0; i<=10; i++) {
		MM_showHideLayers('Layer'+i,'','hide');
	}
}
function showLayer(num) {
	var i;
	if (typeof(num) != "undefined" && num == 0) {
		MM_showHideLayers('Layer'+num,'','show');
		return;
	}
	for(i=0; i<=10; i++) {
		MM_showHideLayers('Layer'+i,'',(typeof(num) != "undefined" && num == i ? 'show' : 'hide'));
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openBrowserWin(url) {
	//wSubmitEmail = new window();
	wSubmitEmail = window.open(url, "wSubmitEmail", "width=200,height=100,status=no,toolbar=no,menubar=no,location=no,favorites=no,scrollbars=no,resizable=no");
	if (typeof(wSubmitEmail) != "undefined") {
		return(true);
	} else {
		return(false);
	}
}
function checkMail(email, msg)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(email)) {
		return(true);
	} else {
		if (msg != "" && msg != null) {
			alert(msg);
		}
		return(false);
	}
}
function jumpTo(url) {
	if (typeof(url) != 'undefined' && url != null && url != '') {
		location.href = url;
	}
}
function clearmsg(){
	document.sms.abstractbody.value="";
	document.sms.charsleft.value="2000";
	document.sms.abstractbody.focus();
}
function confirmation(mesg,url) {
if ((url != null) && (url != '') && (mesg != null) && (mesg != ''))
	if (confirm(mesg)) location.href = url;
}
var tab = Array();
tab[1] = 0;
tab[2] = 0;
function affmenu(id){
	if(tab[id] == 0){
		$('#ssmenu'+id).slideDown();
		tab[id] = 1;
	}else{
		$('#ssmenu'+id).slideUp();
		tab[id] = 0;
	}
}
