function hover_read(val){
	var fPath = "";
	if(val!=undefined){fPath=val}
	if(navigator.userAgent && (navigator.userAgent.indexOf("MSIE 6") !=-1) ){
		document.write('<link rel="stylesheet" type="text/css" href="'+fPath+'default_hover.css" media="all">')
	}else if(navigator.userAgent &&(navigator.userAgent.indexOf("Mozilla/5.0") != -1 ) &&!(navigator.userAgent.indexOf("Netscape") != -1)){
		document.write('<link rel="stylesheet" type="text/css" href="'+fPath+'default_hover.css" media="all">')
	}
	document.close();
}

function enaChbx(chbxElem, calId){
	var calElem = document.getElementById(calId);
	if(calElem){
		calElem.checked = true;
		calElem.onclick();
		chbxElem.checked = false;
	}
}

function showPref(areaId,currentObj,position){
	var currentElemWidth = (currentObj.offsetWidth) ? currentObj.offsetWidth : 0;
	var parentElemLeft = (currentObj.parentNode.offsetLeft) ? currentObj.parentNode.offsetLeft : 0;

	var areaElem = document.getElementById(areaId);
	var areaElemWidth = (areaElem.offsetWidth) ? areaElem.offsetWidth : 100;
	var areaElemHeight = (areaElem.offsetHeight) ? areaElem.offsetHeight : 50;

	var moveWidth;
	var moveHeight = -areaElemHeight-5+'px';
	if(position == 'head'){
		moveWidth = '-10px';
	}else if(position == 'end'){
		moveWidth = -(areaElemWidth-currentElemWidth-10);
		moveWidth = (moveWidth+parentElemLeft < 0) ? '-5px' : moveWidth+'px';
	}else{
		moveWidth = -(areaElemWidth-currentElemWidth)/2;
		moveWidth = (moveWidth+parentElemLeft < 0) ? '-5px' : moveWidth+'px';
	}
	areaElem.style.visibility = 'visible';
	areaElem.style.left = moveWidth;
	areaElem.style.top = moveHeight;
}

function hidePref(areaId){
	var areaElem = document.getElementById(areaId);
	areaElem.style.visibility = 'hidden';
}
