
var ua=navigator.userAgent.toLowerCase();var isSafari=(ua.indexOf("safari")!=-1);var isIE=(ua.indexOf("msie")!=-1);var isIE8=(ua.indexOf("msie 8.")!=-1);function yousure(msg){return confirm(msg?msg:"Are you sure to delete it?");}
function togSubMenu(o,s,picurl){if(!document.getElementById)return;var a=document.getElementById(s);if(!a)return;if(a.style.display=="none"){a.style.display="block";o.src=picurl+'/1downarrow.gif';}else if(a.style.display=="block"){a.style.display="none";o.src=picurl+'/1rightarrow.gif';}}
function setCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"; path=/")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");}
function getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}
function deleteCookie(name)
{var exp=new Date();exp.setTime(exp.getTime()-1800);document.cookie=name+"=0; expires="+exp.toGMTString()+"; path=/";}
function getScrollPos()
{return window.pageYOffset?window.pageYOffset:window.document.body.scrollTop?window.document.body.scrollTop:window.scrollY?window.scrollY:window.document.documentElement.scrollTop;}
function saveScrollPos()
{var y=getScrollPos();if(y){setCookie("FDSy",-y);}
return true;}
function restoreScrollPos()
{var y=parseInt(getCookie("FDSy"));deleteCookie("FDSy");if(y)window.scrollTo(0,y);}
function onLoadCallback(){if(document.fdsForm){return true;}
var a,inputs=document.getElementsByTagName('a');for(var i=0;(a=inputs[i]);i++){if(!a.onclick)a.onclick=saveScrollPos;}
restoreScrollPos();}
function ScrollPos(y)
{return true;}
function getElementDims(obj){var xOffset=obj.offsetLeft||0;var yOffset=obj.offsetTop||0;var width=obj.offsetWidth||0;var height=obj.offsetHeight||0;var readScroll,elParent=obj.offsetParent;while(elParent){yOffset+=elParent.offsetTop||0;xOffset+=elParent.offsetLeft||0;elParent=elParent.offsetParent;}
if((window.document.compatMode)&&(window.document.compatMode=='CSS1Compat')){readScroll=window.document.documentElement;}else{readScroll=window.document.body;}
if(readScroll.scrollLeft&&readScroll.clientTop){xOffset-=(readScroll.scrollLeft-readScroll.clientLeft);yOffset-=(readScroll.scrollTop-readScroll.clientTop);}
return{x:xOffset,y:yOffset,w:width,h:height};}
function setDivWH(n){var divt=document.getElementById(n),maxw=0,maxh=0;if(!divt)return;var divs=divt.getElementsByTagName('div'),a;for(var i=0;(div=divs[i]);i++){if(div.offsetWidth){if(div.offsetWidth>maxw){maxw=div.offsetWidth;}
div.yuw=div.offsetWidth;}
if(div.offsetHeight&&div.offsetHeight>maxh){maxh=div.offsetHeight;}}
if(maxw>200&&divs.length>5)maxw=200;for(var i=0;(div=divs[i]);i++){if(isIE){div.style.textAlign='left';div.style.width='200px';continue;}
if(maxw)div.style.width=maxw+'px';if(maxh)div.style.height=maxh+'px';if(!isSafari&&div.yuw&&div.yuw>maxw&&(a=document.getElementById('a'+(i+1)))&&a.text){var s=a.text.substr(0,parseInt(maxw*a.text.length/div.yuw-3));a.innerHTML=s+'...';}}}
function showMenu(evt,txt){var a=txt.split('<br>'),t='';for(var j=0;j<a.length;j++){var b=a[j].split('::');if(b.length==2){t+='<a href="'+b[0]+'">'+b[1]+'</a>';}else{t+=a[j];}
if(j<a.length-1){t+='<br>';}}
if(document.all){document.all.contextMenu.style.pixelLeft=event.clientX;document.all.contextMenu.style.pixelTop=event.clientY;document.all.contextMenu.style.visibility='visible';document.all.contextMenu.innerHTML=t;return false;}else if(document.layers){document.contextMenu.left=evt.x;document.contextMenu.top=evt.y;document.contextMenu.onmouseout=function(evt){this.visibility='hide';};document.contextMenu.visibility='show';document.contextMenu.innerHTML=t;return false;}else if(document.getElementById){evt.preventDefault();var menu=document.getElementById('contextMenu');if(!menu)return true;menu.innerHTML=t;menu.style.left=evt.pageX+'px';menu.style.top=evt.pageY+'px';menu.style.visibility='visible';return false;}
return true;}
document.write('<div id="dhtmltooltip"></div>');var offsetxpoint=-60;var offsetypoint=20;var ie=document.all;var ns6=document.getElementById&&!document.all;var enabletip=false,ddrivetipobj=null;var tipobj=null;function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function ddrivetip(e,thetext,thecolor,thewidth){if(ie||ns6){if(ddrivetipobj&&e.target&&ddrivetipobj==e.target)return;if(!tipobj)tipobj=document.all?document.all["dhtmltooltip"]:document.getElementById?document.getElementById("dhtmltooltip"):"";if(typeof thewidth!="undefined")tipobj.style.width=thewidth+"px";if(typeof thecolor!="undefined"&&thecolor!="")tipobj.style.backgroundColor=thecolor;tipobj.innerHTML=thetext;enabletip=true;ddrivetipobj=null;positiontip(e);return false;}}
function positiontip(e){if(enabletip){var curX=(ns6)?e.pageX:event.clientX+ietruebody().scrollLeft;var curY=(ns6)?e.pageY:event.clientY+ietruebody().scrollTop;var rightedge=ie&&!window.opera?ietruebody().clientWidth-event.clientX-offsetxpoint:window.innerWidth-e.clientX-offsetxpoint-20;var bottomedge=ie&&!window.opera?ietruebody().clientHeight-event.clientY-offsetypoint:window.innerHeight-e.clientY-offsetypoint-20;var leftedge=(offsetxpoint<0)?offsetxpoint*(-1):-1000;if(rightedge<tipobj.offsetWidth)
tipobj.style.left=ie?ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px":window.pageXOffset+e.clientX-tipobj.offsetWidth+"px";else if(curX<leftedge)
tipobj.style.left="5px";else
tipobj.style.left=curX+offsetxpoint+"px";if(bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie?ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px":window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px";else
tipobj.style.top=curY+offsetypoint+"px";tipobj.style.visibility="visible";}}
function hideddrivetip(){if(ns6||ie){if(ddrivetipobj)return;enabletip=false;tipobj.style.visibility="hidden";tipobj.style.left="-1000px";tipobj.style.backgroundColor='';tipobj.style.width='';}}
function togddrivetip(obj,e,act,thecolor,thewidth,data){if(obj&&(!ddrivetipobj||ddrivetipobj!=obj)){ddrivetip(e,'please wait...',thecolor,thewidth);ddrivetipobj=obj;if(act){if(data){sendXMLHttp(act,'POST',true,data);}else{sendXMLHttp('?ajax-'+act,'GET',true);}}}else{ddrivetipobj=null;hideddrivetip();}}
var fs="\035";var XMLHttpOrg=[];function sendXMLHttp(action,method,async,data){var xmlreq=false;if(window.XMLHttpRequest){try{xmlreq=new XMLHttpRequest();}catch(e1){;}}else if(window.ActiveXObject){try{xmlreq=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{xmlreq=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){;}}}
if(!xmlreq)return true;try{var fds_url=document.URL.replace(/\?.*$/,'');if(!method||method.match(/[Gg][Ee][Tt]/)){xmlreq.open('GET',fds_url+action,async?true:false);xmlreq.onreadystatechange=function(){handleXMLHttpResponse(xmlreq);};xmlreq.send(null);}else{xmlreq.open('POST',fds_url,async?true:false);xmlreq.onreadystatechange=function(){handleXMLHttpResponse(xmlreq);};xmlreq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(action){xmlreq.send('action=ajax&act='+action+'&'+data);}else{var s='',form=data.action?data:data.form,isform=data.action?1:0;for(var i=0;i<form.elements.length;i++){if(form.elements[i].name){var o=form.elements[i],n=o.name,v=o.value;if(o.type){if(o.type=="select-one"&&o.selectedIndex>=0){v=o.options[o.selectedIndex].value;}else if(o.type=="select-multiple"){for(var j=0;j<o.options.length;j++){if(o.options[j].selected){s+='&'+n+'='+encodeURIComponent(o.options[j].value);}}
n='';}else if(o.type=="radio"||o.type=="checkbox"){if(o.checked){s+='&'+n+'='+encodeURIComponent(o.value);}
n='';}else if(o.type=="submit"){if(isform||data!=o){n='';}}}
if(n){s+='&'+n+'='+encodeURIComponent(v);}}}
xmlreq.send(s);}}}catch(er){;}
return true;}
function handleXMLHttpResponse(xmlreq){try{if(xmlreq.readyState==4){if(xmlreq.status==200){var response=xmlreq.responseText;var a=response.split(fs),i,n,e,k=1;for(var j=0;j<a.length;j++){if(a[j].match(/^[0-9a-zA-Z_]+=/)&&(i=a[j].indexOf('='))>0){n=a[j].substr(0,i);e=document.getElementById(n);if(e){if(!XMLHttpOrg[n]){XMLHttpOrg[n]=e.innerHTML;}
removeAllChildren(e);e.innerHTML=k?XMLHttpOrg[n]+'<p />'+a[j].substr(i+1):a[j].substr(i+1);k=1;}else if(n=='function'){eval(a[j].substr(i+1));}}else if(a[j].match(/\(.*\)/)){eval(a[j]);}else if(a[j]=='clear'){k=0;}else if(a[j]=='wfit'&&e){var w=getMaxWidthAllChildren(e);if(!e.offsetWidth||w>e.offsetWidth)e.style.width=w+'px';}}}else{}
xmlreq=false;}}catch(er){xmlreq=false;}}
function removeAllChildren(o){try{for(var c=o.firstChild;c;c=c.nextSibling){removeAllChildren(c);c=null;}}catch(er){;}}
function getMaxWidthAllChildren(o){var v,w=o.offsetWidth?o.offsetWidth:0;try{for(var c=o.firstChild;c;c=c.nextSibling){v=getMaxWidthAllChildren(c);if(v>w)w=v;}}catch(er){;}
return w;}
function setTrBgClr(tr){var o=tr.parentNode;for(var c=o.firstChild;c;c=c.nextSibling){if(c.style&&c.style.backgroundColor){c.style.backgroundColor='';}}
tr.style.backgroundColor='#ffcc99';}
function toggleDisplay(id){var div=document.getElementById(id);if(!div)return false;if(div.style.display=='none'){div.style.display="";}else{div.style.display="none";}}
function getById(n){return document.getElementById(n);}
function getByName(n){return document.getElementsByName(n)[0];}
function setDisplay(){var m=arguments.length-1;if(m<1)return;for(var i=0;i<m;i++){arguments[i].style.display=arguments[m];}}
var fds_src='',AutoSaveEnabled=0,ComboBoxAdj=[];if(document.URL){fds_src=document.URL.replace(/([^:\/])\/.*$/,'$1');}