/****************************************************\
| UNMF UI 1.0                                        |
| Copyright by BonaSource Inc. (bonasource.com) 2003 |
\****************************************************/


function MM_reloadPage(init) {
  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);

//========================================================

var mmOverColorN = "#000000";
var mmOverColorO = "#00518A";

function mmOver(obj, st) {
  if(!isDOM) return;
	var i, objStyle;
	var objA = obj.getElementsByTagName("A");
	for(i = 0; i < objA.length; i++) {
		objStyle = (objA[i].style) ? objA[i].style : objA[i];
		objStyle.color = (st) ? mmOverColorO : mmOverColorN;
	}
}

var smOverColorN = "#000000";
var smOverColorO = "#006EBC";

function smOver(obj, st) {
  if(!isDOM) return;
	var i, objStyle;
	var objA = obj.getElementsByTagName("A");
	for(i = 0; i < objA.length; i++) {
		objStyle = (objA[i].style) ? objA[i].style : objA[i];
		objStyle.color = (st) ? smOverColorO : smOverColorN;
	}
}

var newsOverColorN = "#FFFFFF";
var newsOverColorO = "#FFCC94";

function newsOver(obj, st) {
  if(!isDOM) return;
	var i, objStyle;
	var objA = obj.getElementsByTagName("A");
	for(i = 0; i < objA.length; i++) {
		objStyle = (objA[i].style) ? objA[i].style : objA[i];
		objStyle.color = (st) ? newsOverColorO : newsOverColorN;
	}
}

function mmGo(obj) {
	if(!isDOM) return;
	var objA = obj.getElementsByTagName("A");
  window.location = objA[0].href;
}

//========================================================

var isOK;

function checkEmail(fld) {
  var i = 0, coS = 0, cStr, flDot = true;
  var str = document.forms['form3'].elements[fld].value;
  while((i = str.indexOf('@', i + 1)) != -1) coS++;
  while((i = str.indexOf('.', i + 1)) != -1)
    if(str.indexOf('.', i + 1) != -1 && (str.indexOf('.', i + 1) - i) == 1) flDot = false;
  if(coS == 1 && flDot && str.indexOf(' ') == -1 && str.charAt(0) != '.') {
    var lStr = str.substring(0, str.indexOf('@'));
	var rStr = str.substring(str.indexOf('@') + 1, str.length);
	if(lStr.charAt(lStr.length - 1) != '.' && rStr.charAt(0) != '.') {
	  if((coS = rStr.lastIndexOf('.')) != -1) {
	    if((str.lastIndexOf('.') - str.indexOf('@')) > 1) {
	      rStr = rStr.substring(coS + 1, str.length);
	      if(rStr.length > 1) {
		    isOK = true;
		    return true;
		  }
	    }
      }
	}
  }
  isOK = false;
  alert('Please enter valid email');
  return false;
}

//========================================================

dWriteDiv = '<div id="zoomDIVfix" class="divFixSize">WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW</div>';
dWriteDiv += '<div id="zoomDIV" class="divSize" onresize="resDoc();">WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW</div>';

function resDoc() {
  var cz = Math.round(document.all.zoomDIV.offsetWidth / document.all.zoomDIVfix.offsetWidth * 100);
  if(cz > 95 && cz < 105) cz = 100;
  document.body.style.zoom = cz + "%";
}
