// JavaScript Document



function PopUp(url, width, height) {
		
		var options = 'width=' + width + ',height=' + height + ',toolbar=1,scrollbars=1,resizable=1,location=1';
        window.open(url,'',options);
		return false;
	}
	
function miniPopUp(url, width, height, name) {
		
		var options = 'width=' + width + ',height=' + height + ',toolbar=0,scrollbars=1,resizable=0,location=0';
        window_handle = window.open(url,name,options);
		
		return false;
	}
	
function CloseAndGoTo(page, new_page) {
		if (new_page === true) {
			
			window.open(page, '', 'toolbar=1,scrollbars=1,resizable=1,location=1');
		}
		else {
			if (navigator.userAgent.indexOf("Opera")==-1) {
				window.opener.document.location.href = page;
			} else {
				
				opener.document.location.href = page;
			}
		}
		
		window.close();
	}
	
	



function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}


var bo_ns_id = 0;

function startIeFix(){
  if(isIEX()){
    document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
  }
}

function endIeFix(){
  if(isIEX()){
    document.write('</div>');
    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
    var theCode = theObject.innerHTML;
    theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
    document.write(theCode);
  }
}

function isIEX(){
  // only for Win IE 6+
  // But not in Windows 98, Me, NT 4.0, 2000
  var strBrwsr= navigator.userAgent.toLowerCase();
  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
    if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
      return false;
    }
    if(strBrwsr.indexOf("win98") > -1 ||
       strBrwsr.indexOf("win 9x 4.90") > -1 ||
       strBrwsr.indexOf("winnt4.0") > -1 ||
       strBrwsr.indexOf("windows nt 5.0") > -1)
    {
      return false;
    }
    return true;
  }else{
    return false;
  }
}

function setParentTitle() {
	
	parent.document.title=document.title;
}



