var DHTML=(document.getElementById||document.all||document.layers);
function clearDefault(el){
if(el.defaultValue==el.value){
el.value="";
}
}
/*

function  handleBetaPopUp()
{
	var newVisitor = new Cookie("newVisitor");
	//alert("Cookie value = "+newVisitor.read());
	if (newVisitor.read() != "false") 
	{ 	//no cookie set
        	popBetaLayer('beta_layer');
		newVisitor.save("false", 365);
	}
	
	newVisitor.save("false", 365);
}


*/
function  handleBetaPopUp()
{
	
	//alert("Cookie value = "+newVisitor.read());
	
	if (readCookie("newVisitor") != "false") 
	{ 	//no cookie set
		saveCookie("newVisitor", "false", 365);
		popBetaLayer('beta_layer');
        
	}
	
	
}
function popBetaLayer(_2,_3)
{
	 
	 var myTop = 0, myLeft = 0;
	 if( typeof( window.innerWidth ) == 'number' ) 
	 {
		//Non-IE
		myTop = window.innerHeight/2-150;
		myLeft = document.body.scrollWidth/2-212;
		
	 }
	 else
	 {
		//ie
		myTop = document.documentElement.clientHeight/2-150;
		myLeft = document.body.scrollWidth/2-212;
	 }
		
var _4={visi:getObj("transBack").style.visibility=="visible"?"hidden":"visible",width:"425px",height:"325px",maskColor:"#000000",top:String(myTop)+"px",left:String(myLeft)+"px"};
if(typeof _3==typeof []){
for(var i in _3){
_4[i]=_3[i];
}
}
if(document.getElementById){
getObj("transBack").style.width=document.body.clientWidth+"px";
getObj("transBack").style.height=(screen.height>document.body.clientHeight?screen.height:document.body.clientHeight)+"px";
getObj("transBack").style.background=_4.maskColor;
getObj(_2).style.visibility=_4.visi;
getObj("transBack").style.visibility=_4.visi;
getObj("transBack").style.visibility=_4.visi;
getObj(_2).style.display="block";
getObj(_2).style.width=_4.width;
getObj(_2).style.height=_4.height;
getObj(_2).style.left=_4.left;
getObj(_2).style.top=_4.top;
}
}
function popLayer(_2,_3){
var _4={visi:getObj("transBack").style.visibility=="visible"?"hidden":"visible",width:"200px",height:"400px",maskColor:"#000000",top:String(document.body.scrollHeight/2-200)+"px",left:String(document.body.scrollWidth/2-100)+"px"};
if(typeof _3==typeof []){
for(var i in _3){
_4[i]=_3[i];
}
}
if(document.getElementById){
getObj("transBack").style.width=document.body.clientWidth+"px";
getObj("transBack").style.height=(screen.height>document.body.clientHeight?screen.height:document.body.clientHeight)+"px";
getObj("transBack").style.background=_4.maskColor;
getObj(_2).style.visibility=_4.visi;
getObj("transBack").style.visibility=_4.visi;
getObj("transBack").style.visibility=_4.visi;
getObj(_2).style.display="block";
getObj(_2).style.width=_4.width;
getObj(_2).style.height=_4.height;
getObj(_2).style.left=_4.left;
getObj(_2).style.top=_4.top;
}
}
//this function is called from the onclick event
//attached to the radio buttons under the search 
function FormActionValue(action,value)
{
	document.forms[0].action = action;
	document.forms[0].type.value = value;
}
function CountDown(){
warnTime=60000*120;
warnMe=setTimeout("RunDown()",warnTime);
}
function RunDown(){
popLayer("logout_layer",{width:"300px",height:"100px"});
LastMinute();
}
function LastMinute(){
closeMe=setTimeout("EndNow()",60000);
}
function EndNow(){
window.location.href="/cms?system_action=users_do_logout&auto=1";
}
var mydate=new Date();
var year=mydate.getYear();
if(year<1000){
year+=1900;
}
var day=mydate.getDay();
var month=mydate.getMonth();
var daym=mydate.getDate();
if(daym<10){
daym="0"+daym;
}
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
function CheckAndSave(){
var _6="";
if(document.resource_form.title.value==""){
_6=_6+"\n- Please enter the resource title";
}
if(document.resource_form.url.value==""){
_6=_6+"\n- Please enter the fully qualified link to the title, e.g. http://www.site.com/article.html";
}
if(document.resource_form.description.value==""){
_6=_6+"\n- Please enter a brief description of the article that is shown in search results";
}
if(_6==""){
document.resource_form.submit();
}else{
alert(_6);
return false;
}
}
function getObj(_7){
if(document.getElementById){
this.obj=document.getElementById(_7);
}else{
if(document.all){
this.obj=document.all[_7];
}else{
if(document.layers){
this.obj=document.layers[_7];
}
}
}
return this.obj;
}
function objExist(_8){
if(document.getElementById){
this.obj=document.getElementById(_8);
}else{
if(document.all){
this.obj=document.all[_8];
}else{
if(document.layers){
this.obj=document.layers[_8];
}
}
}
if(this.obj){
return true;
}else{
return false;
}
}
function divDsp(_9,_a){
if(!DHTML){
return;
}
var x=new getObj(_9);
x.style.display=(_a)?_a:(x.style.display=="inline"||x.style.display=="")?"none":"inline";
}
function CloseAll(){
divDsp("step2","none");
divDsp("step3","none");
divDsp("step4","none");
divDsp("step5","none");
}
function OpenStep(_c){
CloseAll();
divDsp(_c,"inline");
var _d=_c+"_label";
var _e=_c+"_cell";
}
function hollerBack(_f,url,_11,_12,_13){
var _14;
var _15=this;
_f=_f.toUpperCase();



try{
if(window.XMLHttpRequest){
_14=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
try{
_14=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_14=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}
}
if(_f=="POST"){
_14.open(_f,url,true);
_14.setRequestHeader("Content-type","application/x-www-form-urlencoded");
_14.setRequestHeader("Content-length",_11.length);
_14.setRequestHeader("Connection","close");
_14.send(_11);
}else{
_14.open(_f,url+"&"+_11,true);
_14.send(null);
}
if((typeof console=="object")&&console.log){
console.log(url,"\n",_f,"\n",_11);
}
if(objExist(_12)){
var x=new getObj(_12);
_13=getLoadingDiv(_13);
if(_13!=""){
x.innerHTML=_13;
}
}else{
alert("the object '"+_12+"' does not exist,\n if you do not want to write your results to an object, then please use holler() without a 4th argument");
}
}
catch(e){
alert("Error occurred while trying to process your request");
return;
}
_14.onreadystatechange=function(){
if(objExist(_12)){
var x=new getObj(_12);
}
if(_14.readyState==4||_14.readyState=="complete"){
if((typeof console=="object")&&console.log){
console.log(_14.responseText);
}
try{
x.innerHTML=_14.responseText;
RunScriptTag(_14.responseText);
if(_15!=window&&_15.onload){
_15.onload(_14);
}
}
catch(e){
alert("An error occurred while trying to return your request. \nError "+e.description);
}
if(_14.status!=200){
alert("An error occurred while trying to return your request. \nError "+_14.status+": "+_14.statusText);
return;
}
}else{
_13=getLoadingDiv(_13);
if(_13!=""){
x.innerHTML=_13;
}
return;
}
};
}
function hollerBack2(_f,url,_11,_12,clear_div,_13){
	var _14;
	var _15=this;
	_f=_f.toUpperCase();
	try{
		if(window.XMLHttpRequest){
			_14=new XMLHttpRequest();
		}else{
			if(window.ActiveXObject){
				try{
					_14=new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e){
					try{
					_14=new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e){
					}
				}
			}
		}
		if(_f=="POST"){
			_14.open(_f,url,true);
			_14.setRequestHeader("Content-type","application/x-www-form-urlencoded");
			_14.setRequestHeader("Content-length",_11.length);
			_14.setRequestHeader("Connection","close");
			_14.send(_11);
		}else{
			_14.open(_f,url+"&"+_11,true);
			_14.send(null);
		}
		if((typeof console=="object")&&console.log){
			console.log(url,"\n",_f,"\n",_11);
		}
		if(objExist(_12)){
			var x=new getObj(_12);
			_13=getLoadingDiv(_13);
			if(_13!=""){
				x.innerHTML=_13;
			}
			}else{
				alert("the object '"+_12+"' does not exist,\n if you do not want to write your results to an object, then please use holler() without a 4th argument");
			}
	}
	catch(e){
		alert("Error occurred while trying to process your request");
		return;
	}
	_14.onreadystatechange=function(){
		if(objExist(_12)){
			var x=new getObj(_12);
			var y=new getObj(clear_div);
		}
		if(_14.readyState==4||_14.readyState=="complete"){
			if((typeof console=="object")&&console.log){
			console.log(_14.responseText);
		}
		try{
			x.innerHTML=_14.responseText;
			y.innerHTML='';
			RunScriptTag(_14.responseText);
			if(_15!=window&&_15.onload){
				_15.onload(_14);
			}
		}
		catch(e){
			alert("An error occurred while trying to return your request. \nError "+e.description);
		}
		if(_14.status!=200){
			alert("An error occurred while trying to return your request. \nError "+_14.status+": "+_14.statusText);
			return;
		}
		}else{
			_13=getLoadingDiv(_13);
			if(_13!=""){
				x.innerHTML=_13;
			}
			return;
		}
	};
}



function getLoadingDiv(_18){
if(_18=="none"){
return "";
}else{
if(_18=="long"){
return "<div><img src=\"/img/loading.gif\" alt=\"\" width=\"220\" height=\"19\" border=\"0\"></div>";
}else{
if(_18){
return "<div>"+_18+"</div>";
}else{
return "<div><img src=\"/img/icon.indicator.gif\" alt=\"\" width=\"16\" height=\"16\" border=\"0\"></div>";
}
}
}
}
function holler(_19,url,_1b,_1c){
_19=_19.toUpperCase();
var _1d;
try{
if(window.XMLHttpRequest){
_1d=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
try{
_1d=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_1d=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}
}
if(_19=="POST"){
_1d.open(_19,url,true);
_1d.setRequestHeader("Content-type","application/x-www-form-urlencoded");
_1d.setRequestHeader("Content-length",_1b.length);
_1d.setRequestHeader("Connection","close");
_1d.send(_1b);
}else{
_1d.open(_19,url+"&"+_1b,true);
_1d.send(null);
}
}
catch(e){
alert("Error occurred while trying to process your request");
return;
}
_1d.onreadystatechange=function(){
if(_1d.readyState==4||_1d.readyState=="complete"){
if((typeof console=="object")&&console.log){
console.log(_1d.responseText);
}
if(_1d.status==200){
if(typeof _1c=="string"){
eval(_1c);
}else{
if(typeof _1c=="function"){
_1c(_1d);
}
}
}else{
alert("An error occurred while trying to return your request. \nError "+_1d.status+": "+_1d.statusText);
return;
}
}
};
}
function RunScriptTag(_1e){
if(_1e.indexOf("<script")>=0){
try{
var re=new RegExp(/<script.*?>((?:.|\s)*?)<\/script>/i);
var _20=re.exec(_1e);
if(_20&&_20[1]!=""){
eval(_20[1]);
}
}
catch(e){
alert("RunScriptTag had an error: "+(e.toSource?e.toSource():e.description));
}
}
}
function getCalendar(_21,_22,_23){
thisObj="calcal";
thisObj2="iframe1";
if(!objExist(thisObj)){
return;
}
var x=new getObj(thisObj);
if(!(x.style.display=="inline"||x.style.display=="")){
x.style.display="inline";
}
if(!objExist(thisObj2)){
return;
}
var z=new getObj(thisObj2);
if(!(z.style.display=="inline"||z.style.display=="")){
z.style.display="inline";
}
x.style.position="absolute";
z.style.position="absolute";
if(_23){
if(navigator.appName=="Netscape"){
showX=(_23.pageX);
showY=(_23.pageY);
}else{
showX=(_23.clientX);
showY=(_23.clientY)+document.body.scrollTop;
}
x.style.left=showX+"px";
x.style.top=showY+"px";
z.style.left=showX+"px";
z.style.top=showY+"px";
z.style.width=220;
z.style.zIndex=x.style.zIndex-1;
}
function upload(_26){
alert("here in upload");
var par=window.parent.document;
iframe=par.getElementsByName("iframe"+_26);
iframe.className="hidden";
var _28=par.getElementById("images"+_26);
var _29=par.createElement("div");
var _2a=par.createElement("img");
var _2b=par.createTextNode("Loading...");
_2a.src="indicator.gif";
_2a.className="load";
_29.appendChild(_2a);
_28.appendChild(_29);
var _2c=_28.getElementsByTagName("div").length-1;
document.iform.imgnum.value=_2c;
setTimeout(document.iform.submit(),5000);
}
function str2Date(_2d){
_2d=_2d.split("/");
return (new Date(_2d[2],eval(_2d[0]-1),_2d[1]));
}
function date2Str(_2e){
return ((_2e.getMonth()+1)+"/"+_2e.getDate()+"/"+_2e.getFullYear()+"");
}
function year_dropdown(_2f){
today=new Date();
year=today.getFullYear();
var _30=new Date(_31);
if(_2f==""||isNaN(_2f)){
_2f=year;
}
var _32="";
_32+="<select onchange=\""+_33+"('"+_21+"', this.value)\" style=\"background-color:"+_34+"; color:ffffff; font:bold 11px "+_35+";\">\n";
if(_2f>_36){
_32+="\t<option value=\""+((_30.getMonth()+1)+"/"+_30.getDate()+"/"+_2f)+"\" selected>"+_2f+"</option>\n";
}
for(var _37=_36;_37>=_38;_37--){
if(_37==_2f){
selected="selected";
}else{
selected="";
}
_32+="\t<option value=\""+((_30.getMonth()+1)+"/"+_30.getDate()+"/"+_37)+"\" "+selected+">"+_37+"</option>\n";
}
if(_2f<_38){
_32+="\t<option value=\""+((_30.getMonth()+1)+"/"+_30.getDate()+"/"+_2f)+"\" selected>"+_2f+"</option>\n";
}
_32+="</select>\n";
return _32;
}
function month_dropdown(_39){
var _3a=new Date(_31);
month_dropdown="";
month_dropdown+="<select onchange=\""+_33+"('"+_21+"', this.value)\" style=\"background-color:"+_34+"; color:ffffff; font:bold 11px "+_35+";\">";
for(var _3b=0;_3b<_3c.length;_3b++){
if(_3b==_39){
selected="selected";
}else{
selected="";
}
month_dropdown+="<option value=\""+((_3b+1)+"/"+_3a.getDate()+"/"+_3a.getFullYear())+"\" "+selected+">"+_3c[_3b]+"</option>";
}
month_dropdown+="</select>";
return month_dropdown;
}
var _33="getCalendar";
var _3d=new Date();
var _3c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var _3e=["1","2","3","4","5","6","7","8","9","10","11","12"];
var _3f=["Su","Mo","Tu","We","Th","Fr","Sa"];
var _38=(_3d.getFullYear()-600);
var _36=(_3d.getFullYear()+2);
var _40=0;
var _31=(_22==null||_22==""?new Date():str2Date(_22));
var _41=new Date(_31);
_41.setMonth(_31.getMonth()-1);
var _42=new Date(_31);
_42.setMonth(_31.getMonth()-12);
var _43=new Date(_31);
_43.setMonth(_31.getMonth()+1);
var _44=new Date(_31);
_44.setMonth(_31.getMonth()+12);
var _45=new Date(_31);
_45.setDate(1);
_45.setDate(1-(7+_45.getDay()-_40)%7);
var _46=new Date(_43);
_46.setDate(0);
var _34="#6b9ec6";
var _47="#ddebf4";
var _48="#ffffff";
var _49="#ffd700";
var _4a="#ffd700";
var _4b="#000000";
var _35="tahoma,sans-serif";
var _4c="text-align:right;";
var _4d=new String("<div style=\"width: 230px; background-color: #c0c0c0; padding: 0px 1px 2px 1px;\">"+"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\""+_34+"\">"+"<tr bgcolor=\"#808080\" style=\"border-top: 1px solid #000000;border-bottom: 1px solid #000000;\"><td colspan=2 align=right style=\"color:white; font: small-caps bold 14px "+_35+";\"> <a href=\"javascript://\" onclick=\"var x = new getObj('"+thisObj+"'); x.innerHTML=''; divDsp('"+thisObj+"','none'); divDsp('"+thisObj2+"','none');\" style=\"border: 1px solid #ffffff; color:ffffff; font: normal bold 12px "+_35+"; text-decoration: underline;\">&nbsp;X&nbsp;</a></td></tr>"+"<tr><td align=left nowrap style=\"background-color:"+_34+"; padding: 5px 5px 5px 5px; color:ffffff; font: small-caps bold 14px "+_35+";\">"+"\t<a href=\"javascript:"+_33+"('"+_21+"', '"+date2Str(_41)+"');\" style=\" padding: 0px 0px 5px 5px; color:white; font: small-caps bold 14px "+_35+";\">&laquo;</a>"+" "+month_dropdown(_31.getMonth())+"\t<a href=\"javascript:"+_33+"('"+_21+"', '"+date2Str(_43)+"');\" style=\"padding: 0px 5px 5px 0px; color:white; font: small-caps bold 14px "+_35+";\">&raquo;</a>"+"</td><td align=right>"+"\t<a href=\"javascript:"+_33+"('"+_21+"', '"+date2Str(_42)+"');\" style=\" padding: 0px 0px 5px 5px; color:white; font: small-caps bold 14px "+_35+";\">&laquo;</a> "+" "+year_dropdown(_31.getFullYear())+"\t<a href=\"javascript:"+_33+"('"+_21+"', '"+date2Str(_44)+"');\" style=\"padding: 0px 5px 5px 0px; color:white; font: small-caps bold 14px "+_35+";\">&raquo;</a> "+"</td></tr></table>"+"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"c0c0c0\">");
var _4e=new Date(_45);
_4d+="<tr>\n";
for(var n=0;n<7;n++){
_4d+="<th align=\"center\" style=\""+_4c+";\">"+_3f[(_40+n)%7]+"</th>";
}
_4d+="</tr>\n";
while(_4e.getMonth()==_31.getMonth()||_4e.getMonth()==_45.getMonth()){
_4d+="<tr style=\"background-color:f5f5f5; color:white; font:bold 11px "+_35+";\">";
for(var _50=0;_50<7;_50++){
if(_4e.getDate()==_31.getDate()&&_4e.getMonth()==_31.getMonth()){
_4d+=" <td style=\"background-color:"+_49+"; border: 1px solid "+_49+"; color:#000000; font:bold 11px "+_35+";\" align=\"right\" onmouseover=\"this.style.backgroundColor='"+_4a+"'; this.style.borderColor='"+_4b+"';\" onmouseout=\"this.style.backgroundColor='"+_49+"'; this.style.borderColor='"+_49+"';\" >";
}else{
if(_4e.getDay()==0||_4e.getDay()==6){
_4d+=" <td style=\"background-color:"+_47+"; border: 1px solid "+_47+"; color:#000000; font:bold 11px "+_35+";\" align=\"right\" onmouseover=\"this.style.backgroundColor='"+_4a+"'; this.style.borderColor='"+_4b+"';\" onmouseout=\"this.style.backgroundColor='"+_47+"'; this.style.borderColor='"+_47+"';\" >";
}else{
_4d+=" <td style=\"background-color:"+_48+"; border: 1px solid "+_48+"; color:000000; font:bold 11px "+_35+";\" align=\"right\" onmouseover=\"this.style.backgroundColor='"+_4a+"'; this.style.borderColor='"+_4b+"';\" onmouseout=\"this.style.backgroundColor='"+_48+"'; this.style.borderColor='"+_48+"';\">";
}
}
if(_4e.getMonth()==_31.getMonth()){
_4d+="<a href=\"javascript:if("+_21+"){"+_21+".value='"+date2Str(_4e)+"';} divDsp(thisObj,'none'); divDsp(thisObj2,'none'); "+_21+".focus();\" onMouseOver=\"self.status='"+date2Str(_4e)+"'; return true\" onMouseout=\"self.status=''; return true\" style=\"padding: 0px 0px 0px 14px; color:000000; font: 11px "+_35+";\">";
}else{
_4d+="<a href=\"javascript:if("+_21+"){"+_21+".value='"+date2Str(_4e)+"';} divDsp(thisObj,'none'); divDsp(thisObj2,'none'); "+_21+".focus();\" onMouseOver=\"self.status='"+date2Str(_4e)+"'; return true\" onMouseout=\"self.status=''; return true\" style=\"padding: 0px 0px 0px 14px; color:778899; font: 11px "+_35+";\">";
}
_4d+=_4e.getDate()+"</a></td>\n";
_4e.setDate(_4e.getDate()+1);
}
_4d+="</tr>\n";
}
_4d+="<form name=\"cal\">\n<tr><td colspan=\"7\" bgcolor=\"#87CEFA\">"+"<!--Time: ---><input type=\"hidden\" name=\"time\" value=\""+date2Str(_31)+"\" size=\"8\" maxlength=\"8\"></td></tr>\n</form>\n"+"</form></table>\n"+"</div>";
x.innerHTML=_4d;
}
document.write("<iframe id=\"iframe1\" src=\"javascript:false;\" scrolling=\"no\" frameborder=\"0\" style=\"display:none;\"></iframe><div id=\"calcal\" style=\"z-index:100; display:none;\">calendar</div>");
function _(val){
return encodeURIComponent(val);
}
function multiUpdate(obj){
for(var i in obj){
if(!(i.match(/^_/))&&getObj(i)){
getObj(i).innerHTML=obj[i];
}
}
}
