// JavaScript Document
function getWindowSizeAll(a){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){scrollSize=16;myWidth=(a)?window.innerWidth:window.screen.width;myHeight=(a)?window.innerHeight:document.body.parentNode.scrollHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=(a)?document.documentElement.clientWidth:document.body.offsetWidth;myHeight=(a)?document.documentElement.clientHeight:document.body.parentNode.scrollHeight;scrollSize=2;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=(a)?document.body.clientWidth:document.body.offsetWidth;myHeight=(a)?document.body.clientHeight:document.body.offsetHeight;scrollSize=2;}return[myWidth-scrollSize,myHeight];}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX= window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}return[scrOfX,scrOfY];}
function setCenter(id){$(id).style.left=((getWindowSizeAll(true)[0]-$(id).offsetWidth)/2+getScrollXY()[0])+"px";$(id).style.top=((getWindowSizeAll(true)[1]-$(id).offsetHeight)/2+getScrollXY()[1])+"px";};
function spacialTag(txt){txt=txt.replace(/>/g,'&gt;');txt=txt.replace(/</g,'&lt;');return txt;}
function spacialChar(txt){txt=txt.replace(/\\u000a|\\u000d/g," ");txt=txt.replace(/\\u0026/g,"&");return txt;}
function getDataNode(p,t){try{return p.getElementsByTagName(t)[0].firstChild.nodeValue;}catch(e){return "";}};
function textLimitCheck(id,limit,idS){if(!id.nodeName){id=$(id)}txtStr=id.value.replace(/[\n ]+/g,' ');txtLength=txtStr.length;if(idS){$(idS).innerHTML=(txtLength>limit)?"<font>"+txtLength+"/"+limit+"</font>":txtLength+"<font>/"+limit+"</font>";}return (txtLength>limit||txtLength<=0)?false:true;}
function drawMask(fn){html="";mask=document.createElement('div');mask.setAttribute('id','mask');mask.style.left="0px";mask.style.top="0px";mask.style.position="absolute";mask.style.backgroundColor="#000000";document.body.appendChild(mask);mask.style.width=getWindowSizeAll(false)[0]+"px";mask.style.height=getWindowSizeAll(false)[1]+"px";if(ie){mask.style.filter="alpha(opacity=40)";}else{mask.style.MozOpacity=0.4;}if(fn){mask.onclick=fn;mask.style.cursor="pointer";}}
function loadding(fnCancel){loaddingNode=document.createElement('div');loaddingNode.setAttribute('id','loadding');loaddingNode.style.position="absolute";loaddingNode.innerHTML="<img src=\"images/loadding/loading3.gif\" />";document.body.appendChild(loaddingNode);setCenter('loadding');drawMask(fnCancel);}
function cancelLoad(){document.body.removeChild($('loadding'));document.body.removeChild($('mask'));}