margeX=15;
margeY= 10; 
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4) skn=document.layer
else if (ns6) skn=document.getElementById("layer").style
else if (ie4) skn=document.all.layer.style
if (ns4) document.captureEvents(Event.MOUSEMOVE);
else {
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(msg){
var content="<div>"+msg+"</div>";
yyy=margeY;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("layer").innerHTML=content;skn.display=''}
if(ie4){document.all("layer").innerHTML=content;skn.display=''}
}
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+margeX;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}
function go(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
//-->


if (top.location != self.location) {
top.location = self.location.href
}

function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

function MoveList(obj,step){
	if (obj.selectedIndex > -1 && obj.selectedIndex + step > -1 && obj.selectedIndex + step < obj.options.length){
		Val = obj.options[obj.selectedIndex + step].value;
		Text = obj.options[obj.selectedIndex + step].text;
		obj.options[obj.selectedIndex + step].value = obj.options[obj.selectedIndex].value;
		obj.options[obj.selectedIndex + step].text = obj.options[obj.selectedIndex].text;
		obj.options[obj.selectedIndex].value = Val;
		obj.options[obj.selectedIndex].text = Text;
		obj.selectedIndex += step;
	}
}

function noErrors(){return true};
window.onerror = noErrors; 

function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}

function bookmarksite(title, url)
{
   if (document.all)
   {
      window.external.AddFavorite(url, title);
   }
   else if (window.sidebar)
   {
      window.sidebar.addPanel(title, url, "");
   }
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=589,height=288');");
}