function setPluginLanguage(lPluginId)
{$.post(HOST_ROOT_PATH_VAR+'code/Plugin/Language/SetLanguageAjax.php',{'languagePluginId':lPluginId},refreshPageLanguage,"json");}
function refreshPageLanguage(d,s)
{location.replace(window.location.href);location.reload(true);}
function callStaticPage(id,staticPgNm,navigationPlace)
{var abc=staticPgNm.split(" ");var newNm='';if(abc.length>1)
{for(i=0;i<abc.length;i++)
{newNm=newNm+abc[i]}}
else
{newNm=staticPgNm;}
if(staticPgNm=='child')
document.staticPage.staticChildPageId.value=id;else
{document.staticPage.staticParentPageId.value=id;document.staticPage.staticChildPageId.value="";}
if(navigationPlace=="Menu")
{document.staticPage.staticChildPageId.value=id;document.staticPage.staticParentPageId.value="";}
if(navigationPlace=="home")
document.staticPage.staticParentPageId.value="";if(navigationPlace=="inner")
{document.staticPage.staticParentPageId.value="";document.staticPage.staticChildPageId.value=id;}
$("#staticPage").attr('action',HOST_ROOT_PATH_VAR+"StaticPage/");document.staticPage.submit();}
function urlCallFunction(pageUrl,idDisplayLeftNavigation,isDisplayRightNavigation)
{$("#isDisplayLeftNavigation").attr('value',idDisplayLeftNavigation);$("#isDisplayRightNavigation").attr('value',isDisplayRightNavigation);$("#globalForm").attr('action',HOST_ROOT_PATH_VAR+pageUrl);document.globalForm.submit();}$(document).ready(function(){$('code').each(function(){eval($(this).html());})});var prevGridRowClass;function changeCssOnMouseover(gridRowId,cssClass)
{prevGridRowClass=document.getElementById(gridRowId).className;document.getElementById(gridRowId).className=cssClass;}
function changeCssOnMouseout(gridRowId,cssClass)
{document.getElementById(gridRowId).className=cssClass;}
function validateFormOnSubmit(id)
{var elementDivId="TR_"+id;var myDivElement=document.getElementById(elementDivId);var mySelects=myDivElement.getElementsByTagName('INPUT');errorTextToDisplay="";for(var i=0;i<mySelects.length;i++)
{if(mySelects[i].getAttribute("error_text")!=null)
{curVal=document.getElementById(mySelects[i].name).value;columnId=mySelects[i].name;errorText=mySelects[i].getAttribute("error_text");if(errorText==""||errorText==null){errorTextArray="";errorText="";}else{myRegArray=errorText.split("~");errorTextArray=myRegArray[0].split("#");errorText=myRegArray[1].split("#");}
for(myRegCount=0;myRegCount<errorTextArray.length;myRegCount++)
{if("isEmpty"==errorTextArray[myRegCount])
{message=isBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isBlank"==errorTextArray[myRegCount])
{message=isBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isCharacter"==errorTextArray[myRegCount])
{message=isCharacter(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("ischeckboxConfirm"==errorTextArray[myRegCount])
{message=ischeckboxConfirm(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isSpecialCharacter"==errorTextArray[myRegCount])
{message=isSpecialCharacter(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isFirstCharBlank"==errorTextArray[myRegCount])
{message=isFirstCharBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isNumeric"==errorTextArray[myRegCount])
{message=isNumeric(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isEmail"==errorTextArray[myRegCount])
{message=isEmail(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isDecimal"==errorTextArray[myRegCount])
{message=isDecimal(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isDate"==errorTextArray[myRegCount])
{message=isDate(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isPhonrNumber"==errorTextArray[myRegCount])
{message=isPhonrNumber(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("FirstChar"==errorTextArray[myRegCount])
{var first_char=curVal.charAt(0);if(first_char==" ")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}}}}
if(errorTextToDisplay!="")
{alert(errorTextToDisplay);return false;}
return true;}
function validateFormOnChange(columnId,errorText)
{errorTextToDisplay="";if(errorText==""||errorText==null){errorTextArray="";errorText="";}else{myRegArray=errorText.split("~");errorTextArray=myRegArray[0].split("#");errorText=myRegArray[1].split("#");}
curVal=document.getElementById(columnId).value;for(myRegCount=0;myRegCount<errorTextArray.length;myRegCount++)
{if("isEmpty"==errorTextArray[myRegCount])
{message=isBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isBlank"==errorTextArray[myRegCount])
{message=isBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isCharacter"==errorTextArray[myRegCount])
{message=isCharacter(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("ischeckboxConfirm"==errorTextArray[myRegCount])
{message=ischeckboxConfirm(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isSpecialCharacter"==errorTextArray[myRegCount])
{message=isSpecialCharacter(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isFirstCharBlank"==errorTextArray[myRegCount])
{message=isFirstCharBlank(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isNumeric"==errorTextArray[myRegCount])
{message=isNumeric(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isEmail"==errorTextArray[myRegCount])
{message=isEmail(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isDecimal"==errorTextArray[myRegCount])
{message=isDecimal(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isDate"==errorTextArray[myRegCount])
{message=isDate(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("isPhonrNumber"==errorTextArray[myRegCount])
{message=isPhonrNumber(columnId,errorText[myRegCount]);if(message!="")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}
if("FirstChar"==errorTextArray[myRegCount])
{var first_char=curVal.charAt(0);if(first_char==" ")
{errorTextToDisplay+=errorText[myRegCount]+"\n";}}}
if(errorTextToDisplay!="")
{alert(errorTextToDisplay);return false;}
return true;}
function download(downloadType,formName,gridId,gridQuery,queryLimit,paginationQuery,paginationType,isMultiLevelGridAllowed,multiLevelGridUrl,sortByColumnNameGridList,sortOrderGridList)
{document.getElementById('downloadType').value=downloadType;$.post(HOST_ROOT_PATH_VAR+'code/Plugin/GirdList/gridAjax.php',{'downloadType':downloadType,'id':gridId,'query':gridQuery,'formName':formName,'queryLimit':queryLimit,'paginationQuery':paginationQuery,'paginationType':paginationType,'isMultiLevelGridAllowed':isMultiLevelGridAllowed,'multiLevelGridUrl':multiLevelGridUrl,'sortByColumnNameGridList':sortByColumnNameGridList,'sortOrderGridList':sortOrderGridList},getAjaxData,"json");}
function getAjaxData(data,s)
{if(data.success==1)
{document.getElementById('downloadGridHtml').value=data.gridHtml;document.getElementById(data.formName).submit();document.getElementById('downloadType').value="";}}
function getGridDataByAjax(data,s)
{if(data.success==1)
{document.getElementById('div'+data.gridName+data.gridId).innerHTML=data.gridHtml;document.getElementById('pagination'+data.gridName+data.gridId).innerHTML=data.paginationHtml;}}
function gridListActionPlugin(actionMode,actionParameterHFID,rowId,gridName,formName,gridId,gridQuery,queryLimit,paginationQuery,paginationType,isMultiLevelGridAllowed,multiLevelGridUrl,sortByColumnNameGridList,sortOrderGridList)
{var answer=true;if(actionMode=="A")
{}
if(actionMode=="T")
{if(rowId!="")
window.open(rowId);return false;}
if(actionMode=="U")
{answer=validateFormOnSubmit(rowId);var modifyColumnArray=document.getElementsByName('columnNameid[]');var gridListModifyParameterArray=new Array(10);var gridListModifyString='';for(var countArray=0;countArray<modifyColumnArray.length;countArray++)
{gridListModifyParameterArray[countArray]=new Array(2);gridListModifyParameterArray[countArray][0]=modifyColumnArray[countArray].value;gridListModifyParameterArray[countArray][1]=document.getElementById(gridName+"Modify"+modifyColumnArray[countArray].value+rowId).value;gridListModifyString+='~!@#'+gridListModifyParameterArray[countArray][0]+'~!@#'+gridListModifyParameterArray[countArray][1];}}
var gridListActionParameterArray=new Array(10);var columnNameArray=document.getElementById(actionParameterHFID).value;var columnName=columnNameArray.split(",");for(var count=0;count<columnName.length;count++)
{gridListActionParameterArray[count]=new Array(2);gridListActionParameterArray[count][0]=columnName[count];gridListActionParameterArray[count][1]=document.getElementById(gridName+columnName[count]+"Row"+rowId).value;}
var paginationCurrentPage='';var linksPageSet='';var linksToDisplayPagination='';var recordsPerPage='';if(document.getElementById('paginationCurrentPage'+gridId))
{paginationCurrentPage=document.getElementById('paginationCurrentPage'+gridId).value;}
if(document.getElementById('linksPageSet'+gridId))
{linksPageSet=document.getElementById('linksPageSet'+gridId).value;}
if(document.getElementById('linksToDisplayPagination'+gridId))
{linksToDisplayPagination=document.getElementById('linksToDisplayPagination'+gridId).value;}
if(document.getElementById('recordsPerPage'+gridId))
{recordsPerPage=document.getElementById('recordsPerPage'+gridId).value;}
if(answer)
{eval(gridName+"Action(actionMode, gridListActionParameterArray,gridListModifyString);");$.post(HOST_ROOT_PATH_VAR+'code/Plugin/GirdList/gridAjax.php',{'id':gridId,'query':gridQuery,'formName':formName,'queryLimit':queryLimit,'paginationQuery':paginationQuery,'paginationType':paginationType,'isMultiLevelGridAllowed':isMultiLevelGridAllowed,'multiLevelGridUrl':multiLevelGridUrl,'sortByColumnNameGridList':sortByColumnNameGridList,'sortOrderGridList':sortOrderGridList,'paginationCurrentPage':paginationCurrentPage,'linksPageSet':linksPageSet,'linksToDisplayPagination':linksToDisplayPagination,'recordsPerPage':recordsPerPage},getGridDataByAjax,"json");}}
function sortByColumn(columnName,formName)
{document.getElementById('sortByColumnNameGridList').value=columnName;eval("document.getElementById('"+formName+"').submit();");}
function switchMenu(Id,DivId)
{if((document.getElementById(Id).src)==HOST_ROOT_PATH_VAR+"images/plus_img.gif")
{document.getElementById(Id).src=HOST_ROOT_PATH_VAR+"images/minus_img.gif";document.getElementById(DivId).style.display='block';}
else
{document.getElementById(Id).src=HOST_ROOT_PATH_VAR+"images/plus_img.gif";document.getElementById(DivId).style.display='none';}}function recordsPerPageJS(formName,id)
{document.getElementById("paginationCurrentPage"+id).value=1;document.getElementById("linksToDisplayPagination"+id).value=0;document.getElementById(formName).submit();}
function linksToDisplayPaginationJS(pageSet,formName,id)
{document.getElementById("paginationCurrentPage"+id).value=pageSet;document.getElementById(formName).submit();}
function usListPaginationJsPlugin(paginationCurrentPage,formName,id)
{document.getElementById("paginationCurrentPage"+id).value=paginationCurrentPage;document.getElementById(formName).submit();}
function linksPageSetJS(linksPageSet,linkCount,formName,id)
{document.getElementById("paginationCurrentPage"+id).value=linksPageSet*linkCount+1;document.getElementById("linksToDisplayPagination"+id).value=linksPageSet;document.getElementById("linksPageSet"+id).value=linksPageSet;document.getElementById(formName).submit();}
function resetLinksPageSet(id)
{document.getElementById("linksPageSet"+id).value=0;}
function resetPaginationJS(formName,id)
{document.getElementById("paginationCurrentPage"+id).value=1;document.getElementById("linksToDisplayPagination"+id).value=0;}
function submitPaginationFormJS(e,formName,id)
{if(e.keyCode==13)
{resetPaginationJS(formName,id);}}
var dhtmlwindow={imagefiles:['design/templates/Plugin/HtmlControl/windowfiles/min.gif','../images/cross.gif','design/templates/Plugin/HtmlControl/windowfiles/restore.gif','design/templates/Plugin/HtmlControl/windowfiles/resize.gif'],ajaxbustcache:true,ajaxloadinghtml:'<b>Loading Page. Please wait...</b>',minimizeorder:0,zIndexvalue:100,tobjects:[],lastactivet:{},init:function(t){var domwindow=document.createElement("div")
domwindow.id=t
domwindow.className="dhtmlwindow"
var domwindowdata=''
domwindowdata='<div class="drag-handle">'
domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'
domwindowdata+='</div>'
domwindowdata+='<div class="drag-contentarea"></div>'
domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>'
domwindowdata+='</div>'
domwindow.innerHTML=domwindowdata
document.getElementById("dhtmlwindowholder").appendChild(domwindow)
var t=document.getElementById(t)
var divs=t.getElementsByTagName("div")
for(var i=0;i<divs.length;i++){if(/drag-/.test(divs[i].className))
t[divs[i].className.replace(/drag-/,"")]=divs[i]}
t.handle._parent=t
t.resizearea._parent=t
t.controls._parent=t
t.onclose=function(){return true}
t.onmousedown=function(){dhtmlwindow.setfocus(this)}
t.handle.onmousedown=dhtmlwindow.setupdrag
t.resizearea.onmousedown=dhtmlwindow.setupdrag
t.controls.onclick=dhtmlwindow.enablecontrols
t.show=function(){dhtmlwindow.show(this)}
t.hide=function(){dhtmlwindow.hide(this)}
t.close=function(){dhtmlwindow.close(this)}
t.setSize=function(w,h){dhtmlwindow.setSize(this,w,h)}
t.moveTo=function(x,y){dhtmlwindow.moveTo(this,x,y)}
t.isResize=function(bol){dhtmlwindow.isResize(this,bol)}
t.isScrolling=function(bol){dhtmlwindow.isScrolling(this,bol)}
t.load=function(contenttype,contentsource,title){dhtmlwindow.load(this,contenttype,contentsource,title)}
this.tobjects[this.tobjects.length]=t
return t},open:function(t,contenttype,contentsource,title,attr,recalonload){var d=dhtmlwindow
function getValue(Name){var config=new RegExp(Name+"=([^,]+)","i")
return(config.test(attr))?parseInt(RegExp.$1):0}
if(document.getElementById(t)==null)
t=this.init(t)
else
t=document.getElementById(t)
this.setfocus(t)
t.setSize(getValue(("width")),(getValue("height")))
var xpos=getValue("center")?"middle":getValue("left")
var ypos=getValue("center")?"middle":getValue("top")
if(typeof recalonload!="undefined"&&recalonload=="recal"&&this.scroll_top==0){if(window.attachEvent&&!window.opera)
this.addEvent(window,function(){setTimeout(function(){t.moveTo(xpos,ypos)},400)},"load")
else
this.addEvent(window,function(){t.moveTo(xpos,ypos)},"load")}
t.isResize(getValue("resize"))
t.isScrolling(getValue("scrolling"))
t.style.visibility="visible"
t.style.display="block"
t.contentarea.style.display="block"
t.moveTo(xpos,ypos)
t.load(contenttype,contentsource,title)
if(t.state=="minimized"&&t.controls.firstChild.title=="Restore"){t.controls.firstChild.setAttribute("src",dhtmlwindow.imagefiles[0])
t.controls.firstChild.setAttribute("title","Minimize")
t.state="fullview"}
return t},setSize:function(t,w,h){t.style.width=Math.max(parseInt(w),150)+"px"
t.contentarea.style.height=Math.max(parseInt(h),100)+"px"},moveTo:function(t,x,y){this.getviewpoint()
t.style.left=(x=="middle")?this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px":this.scroll_left+parseInt(x)+"px"
t.style.top=(y=="middle")?this.scroll_top+(this.docheight-t.offsetHeight)/2+"px":this.scroll_top+parseInt(y)+"px"},isResize:function(t,bol){t.statusarea.style.display=(bol)?"block":"none"
t.resizeBool=(bol)?1:0},isScrolling:function(t,bol){t.contentarea.style.overflow=(bol)?"auto":"hidden"},load:function(t,contenttype,contentsource,title){if(t.isClosed){alert("DHTML Window has been closed, so no window to load contents into. Open/Create the window again.")
return}
var contenttype=contenttype.toLowerCase()
if(typeof title!="undefined")
t.handle.firstChild.nodeValue=title
if(contenttype=="inline")
t.contentarea.innerHTML=contentsource
else if(contenttype=="div"){var inlinedivref=document.getElementById(contentsource)
t.contentarea.innerHTML=(inlinedivref.defaultHTML||inlinedivref.innerHTML)
if(!inlinedivref.defaultHTML)
inlinedivref.defaultHTML=inlinedivref.innerHTML
inlinedivref.innerHTML=""
inlinedivref.style.display="none"}
else if(contenttype=="iframe"){t.contentarea.style.overflow="hidden"
if(!t.contentarea.firstChild||t.contentarea.firstChild.tagName!="IFRAME")
t.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'" frameborder=0></iframe>'
window.frames["_iframe-"+t.id].location.replace(contentsource)}
else if(contenttype=="ajax"){this.ajax_connect(contentsource,t)}
t.contentarea.datatype=contenttype},setupdrag:function(e){var d=dhtmlwindow
var t=this._parent
d.etarget=this
var e=window.event||e
d.initmousex=e.clientX
d.initmousey=e.clientY
d.initx=parseInt(t.offsetLeft)
d.inity=parseInt(t.offsetTop)
d.width=parseInt(t.offsetWidth)
d.contentheight=parseInt(t.contentarea.offsetHeight)
if(t.contentarea.datatype=="iframe"){t.style.backgroundColor="#F8F8F8"
t.contentarea.style.visibility="hidden"}
document.onmousemove=d.getdistance
document.onmouseup=function(){if(t.contentarea.datatype=="iframe"){t.contentarea.style.backgroundColor="white"
t.contentarea.style.visibility="visible"}
d.stop()}
return false},getdistance:function(e){var d=dhtmlwindow
var etarget=d.etarget
var e=window.event||e
d.distancex=e.clientX-d.initmousex
d.distancey=e.clientY-d.initmousey
if(etarget.className=="drag-handle")
d.move(etarget._parent,e)
else if(etarget.className=="drag-resizearea")
d.resize(etarget._parent,e)
return false},getviewpoint:function(){var ie=document.all&&!window.opera
var domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000
this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body
this.scroll_top=(ie)?this.standardbody.scrollTop:window.pageYOffset
this.scroll_left=(ie)?this.standardbody.scrollLeft:window.pageXOffset
this.docwidth=(ie)?this.standardbody.clientWidth:(/Safari/i.test(navigator.userAgent))?window.innerWidth:Math.min(domclientWidth,window.innerWidth-16)
this.docheight=(ie)?this.standardbody.clientHeight:window.innerHeight},rememberattrs:function(t){this.getviewpoint()
t.lastx=parseInt((t.style.left||t.offsetLeft))-dhtmlwindow.scroll_left
t.lasty=parseInt((t.style.top||t.offsetTop))-dhtmlwindow.scroll_top
t.lastwidth=parseInt(t.style.width)},move:function(t,e){t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"},resize:function(t,e){t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex,150)+"px"
t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey,100)+"px"},enablecontrols:function(e){var d=dhtmlwindow
var sourceobj=window.event?window.event.srcElement:e.target
if(/Minimize/i.test(sourceobj.getAttribute("title")))
d.minimize(sourceobj,this._parent)
else if(/Restore/i.test(sourceobj.getAttribute("title")))
d.restore(sourceobj,this._parent)
else if(/Close/i.test(sourceobj.getAttribute("title")))
d.close(this._parent)
return false},minimize:function(button,t){dhtmlwindow.rememberattrs(t)
button.setAttribute("src",dhtmlwindow.imagefiles[2])
button.setAttribute("title","Restore")
t.state="minimized"
t.contentarea.style.display="none"
t.statusarea.style.display="none"
if(typeof t.minimizeorder=="undefined"){dhtmlwindow.minimizeorder++
t.minimizeorder=dhtmlwindow.minimizeorder}
t.style.left="10px"
t.style.width="200px"
var windowspacing=t.minimizeorder*10
t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"},restore:function(button,t){dhtmlwindow.getviewpoint()
button.setAttribute("src",dhtmlwindow.imagefiles[0])
button.setAttribute("title","Minimize")
t.state="fullview"
t.style.display="block"
t.contentarea.style.display="block"
if(t.resizeBool)
t.statusarea.style.display="block"
t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px"
t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
t.style.width=parseInt(t.lastwidth)+"px"},close:function(t){try{var closewinbol=t.onclose()}
catch(err){var closewinbol=true}
finally{if(typeof closewinbol=="undefined"){alert("An error has occured somwhere inside your \"onclose\" event handler")
var closewinbol=true}}
if(closewinbol){if(t.state!="minimized")
dhtmlwindow.rememberattrs(t)
if(window.frames["_iframe-"+t.id])
window.frames["_iframe-"+t.id].location.replace("about:blank")
else
t.contentarea.innerHTML=""
t.style.display="none"
t.isClosed=true}
return closewinbol},setopacity:function(targetobject,value){if(!targetobject)
return
if(targetobject.filters&&targetobject.filters[0]){if(typeof targetobject.filters[0].opacity=="number")
targetobject.filters[0].opacity=value*100
else
targetobject.style.filter="alpha(opacity="+value*100+")"}
else if(typeof targetobject.style.MozOpacity!="undefined")
targetobject.style.MozOpacity=value
else if(typeof targetobject.style.opacity!="undefined")
targetobject.style.opacity=value},setfocus:function(t){this.zIndexvalue++
t.style.zIndex=this.zIndexvalue
t.isClosed=false
this.setopacity(this.lastactivet.handle,0.5)
this.setopacity(t.handle,1)
this.lastactivet=t},show:function(t){if(t.isClosed){alert("DHTML Window has been closed, so nothing to show. Open/Create the window again.")
return}
if(t.lastx)
dhtmlwindow.restore(t.controls.firstChild,t)
else
t.style.display="block"
this.setfocus(t)
t.state="fullview"},hide:function(t){t.style.display="none"},ajax_connect:function(url,t){var page_request=false
var bustcacheparameter=""
if(window.XMLHttpRequest)
page_request=new XMLHttpRequest()
else if(window.ActiveXObject){try{page_request=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){try{page_request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){}}}
else
return false
t.contentarea.innerHTML=this.ajaxloadinghtml
page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request,t)}
if(this.ajaxbustcache)
bustcacheparameter=(url.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()
page_request.open('GET',url+bustcacheparameter,true)
page_request.send(null)},ajax_loadpage:function(page_request,t){if(page_request.readyState==4&&(page_request.status==200||window.location.href.indexOf("http")==-1)){t.contentarea.innerHTML=page_request.responseText}},stop:function(){dhtmlwindow.etarget=null
document.onmousemove=null
document.onmouseup=null},addEvent:function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)},cleanup:function(){for(var i=0;i<dhtmlwindow.tobjects.length;i++){dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null}
window.onload=null}}
document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>')
window.onunload=dhtmlwindow.cleanup
var dhtmlmodal={veilstack:0,open:function(t,contenttype,contentsource,title,attr,recalonload){var d=dhtmlwindow
this.interVeil=document.getElementById("interVeil")
this.veilstack++
this.loadveil()
if(recalonload=="recal"&&d.scroll_top==0)
d.addEvent(window,function(){dhtmlmodal.adjustveil()},"load")
var t=d.open(t,contenttype,contentsource,title,attr,recalonload)
t.controls.firstChild.style.display="none"
t.controls.onclick=function(){dhtmlmodal.close(this._parent,true)}
t.show=function(){dhtmlmodal.show(this)}
t.hide=function(){dhtmlmodal.close(this)}
return t},loadveil:function(){var d=dhtmlwindow
d.getviewpoint()
this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)?d.standardbody.offsetHeight:d.standardbody.scrollHeight
this.interVeil.style.width=d.docwidth+"px"
this.interVeil.style.height=this.docheightcomplete+"px"
this.interVeil.style.left=0
this.interVeil.style.top=0
this.interVeil.style.visibility="visible"
this.interVeil.style.display="block"},adjustveil:function(){if(this.interVeil&&this.interVeil.style.display=="block")
this.loadveil()},closeveil:function(){this.veilstack--
if(this.veilstack==0)
this.interVeil.style.display="none"},close:function(t,forceclose){t.contentDoc=(t.contentarea.datatype=="iframe")?window.frames["_iframe-"+t.id].document:t.contentarea
if(typeof forceclose!="undefined")
t.onclose=function(){return true}
if(dhtmlwindow.close(t))
this.closeveil()},show:function(t){dhtmlmodal.veilstack++
dhtmlmodal.loadveil()
dhtmlwindow.show(t)}}
document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window,function(){if(typeof dhtmlmodal!="undefined")dhtmlmodal.adjustveil()},"resize")
var ERROR_LOGIN_FAILED='LoginID or Password does not exist';var ERROR_RECORD_SAVE="Sorry Record Not Save. Error !!!!";var ERROR_RECORD_DELETE="Sorry Record Not Delete. Error !!!!";var ERROR_RECORD_UPDATE="Sorry Record Not Update. Error !!!!";var ERROR_SEND_MAIL="Mail send Error !!!! ";var MSG_RECORD_SAVE="Save Record Successfully !";var MSG_RECORD_DELETE="Delete Record Successfully !";var MSG_RECORD_UPDATE="Update Record Successfully !";var MSG_SEND_MAIL="Mail send Successfully !";var MSG_SUGGESTION_BLANK="Please Enter Suggestion First ";var MSG_EMAIL_To_BLANK="Please specify atleast one recipient.";var MSG_EMAIL_SUBJECT_BLANK="Please Enter Subject";var MSG_EMAIL_BODY_BLANK="Please Enter Body";var MSG_FAQ_CATEGORY_NAME_BLANK="Please Enter Faq Category";var MSG_FAQ_CATEGORY_BLANK="Please select faq category";var MSG_FAQ_QUESTION_BLANK="Please Enter Question First";var MSG_FAQ_ANSWER_BLANK="Please Enter Answer First";var MSG_FAQ_UPDATE="Record successfully updated";var MSG_FAQ_DELETE="Record successfully deleted";var MSG_FAQ_DELETE="Record successfully deleted";var MSG_FAQ_CATEGORY_NAME_CHARACTER="First Character can not be blank";var MSG_FAQ_CATEGORY_DELETE="Are you sure you want to delete the category ?";var MSG_FAQ_CATEGORY_MOVE_UP="Category cannot move up";var MSG_FAQ_CATEGORY_MOVE_DOWN="Category cannot move down";var MSG_NEWS_YOUR_COMMNET="Please your commnet!";var MSG_NEWS_YOUR_EMAIL_INVALID="Your Email ID is Invlaid!";var MSG_NEWS_YOUR_EMAIL_BLANK="Your Email ID is blank!";var MSG_NEWS_DESTINATION_EMAIL_INVALID="Destination Email ID is Invlaid!";var MSG_NEWS_DESTINATION_EMAIL="Destination Email ID is blank";var MSG_NEWS_HEADING_BLANK="Please enter news headline";var MSG_NEWS_CATEGORY_BLANK="Please Enter News Category";var MSG_NEWS_CATEGORY="Please Select News Category";var MSG_NEWS_URL_BLANK="Please Enter News Story First";var MSG_NEWS_UPDATE="Record successfully updated";var MSG_NEWS_DELETE="Record successfully deleted";var MSG_NEWS_CATEGORY_CARECTER="First Character can not be blank";var MSG_NEWS_CATEGORY_DELTED="Are you sure you want to delete the record ?";var turnOffYearSpan=false;var weekStartsOnSunday=false;var showWeekNumber=true;var languageCode='en';var calendar_display_time=true;var todayStringFormat='[todayString] [UCFdayString]. [day]. [monthString] [year]';var pathToImages=HOST_ROOT_PATH_VAR+'images/';var speedOfSelectBoxSliding=200;var intervalSelectBox_minutes=5;var calendar_offsetTop=0;var calendar_offsetLeft=0;var calendarDiv=false;var MSIE=false;var Opera=false;if(navigator.userAgent.indexOf('MSIE')>=0&&navigator.userAgent.indexOf('Opera')<0)MSIE=true;if(navigator.userAgent.indexOf('Opera')>=0)Opera=true;switch(languageCode){case"en":var monthArray=['January','February','March','April','May','June','July','August','September','October','November','December'];var monthArrayShort=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var dayArray=['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];var weekString='Week';var todayString='';break;case"ge":var monthArray=['Januar','Februar','M�rz','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];var monthArrayShort=['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'];var dayArray=['Mon','Die','Mit','Don','Fre','Sam','Son'];var weekString='Woche';var todayString='Heute';break;case"no":var monthArray=['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'];var monthArrayShort=['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'];var dayArray=['Man','Tir','Ons','Tor','Fre','L&oslash;r','S&oslash;n'];var weekString='Uke';var todayString='Dagen i dag er';break;case"nl":var monthArray=['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'];var monthArrayShort=['Jan','Feb','Mar','Apr','Mei','Jun','Jul','Aug','Sep','Okt','Nov','Dec'];var dayArray=['Ma','Di','Wo','Do','Vr','Za','Zo'];var weekString='Week';var todayString='Vandaag';break;case"es":var monthArray=['Enero','Febrero','Marzo','April','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'];var monthArrayShort=['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'];var dayArray=['Lun','Mar','Mie','Jue','Vie','Sab','Dom'];var weekString='Semana';var todayString='Hoy es';break;case"pt-br":var monthArray=['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'];var monthArrayShort=['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'];var dayArray=['Seg','Ter','Qua','Qui','Sex','S&aacute;b','Dom'];var weekString='Sem.';var todayString='Hoje &eacute;';break;case"fr":var monthArray=['Janvier','F�vrier','Mars','Avril','Mai','Juin','Juillet','Ao�t','Septembre','Octobre','Novembre','D�cembre'];var monthArrayShort=['Jan','Fev','Mar','Avr','Mai','Jun','Jul','Aou','Sep','Oct','Nov','Dec'];var dayArray=['Lun','Mar','Mer','Jeu','Ven','Sam','Dim'];var weekString='Sem';var todayString="Aujourd'hui";break;case"da":var monthArray=['januar','februar','marts','april','maj','juni','juli','august','september','oktober','november','december'];var monthArrayShort=['jan','feb','mar','apr','maj','jun','jul','aug','sep','okt','nov','dec'];var dayArray=['man','tirs','ons','tors','fre','l&oslash;r','s&oslash;n'];var weekString='Uge';var todayString='I dag er den';break;case"hu":var monthArray=['Január','Február','Március','�?prilis','Május','Június','Július','Augusztus','Szeptember','Október','November','December'];var monthArrayShort=['Jan','Feb','Márc','�?pr','Máj','Jún','Júl','Aug','Szep','Okt','Nov','Dec'];var dayArray=['Hé','Ke','Sze','Cs','Pé','Szo','Vas'];var weekString='Hét';var todayString='Mai nap';break;case"it":var monthArray=['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'];var monthArrayShort=['Gen','Feb','Mar','Apr','Mag','Giu','Lugl','Ago','Set','Ott','Nov','Dic'];var dayArray=['Lun',';Mar','Mer','Gio','Ven','Sab','Dom'];var weekString='Settimana';var todayString='Oggi &egrave; il';break;case"sv":var monthArray=['Januari','Februari','Mars','April','Maj','Juni','Juli','Augusti','September','Oktober','November','December'];var monthArrayShort=['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'];var dayArray=['M&aring;n','Tis','Ons','Tor','Fre','L&ouml;r','S&ouml;n'];var weekString='Vecka';var todayString='Idag &auml;r det den';break;case"cz":var monthArray=['leden','&#250;nor','b&#345;ezen','duben','kv&#283;ten','&#269;erven','&#269;ervenec','srpen','z&#225;&#345;&#237;','&#345;&#237;jen','listopad','prosinec'];var monthArrayShort=['led','&#250;n','b&#345;','dub','kv&#283;','&#269;er','&#269;er-ec','srp','z&#225;&#345;','&#345;&#237;j','list','pros'];var dayArray=['Pon','&#218;t','St','&#268;t','P&#225;','So','Ne'];var weekString='t&#253;den';var todayString='';break;}
if(weekStartsOnSunday){var tempDayName=dayArray[6];for(var theIx=6;theIx>0;theIx--){dayArray[theIx]=dayArray[theIx-1];}
dayArray[0]=tempDayName;}
var daysInMonthArray=[31,28,31,30,31,30,31,31,30,31,30,31];var currentMonth;var currentYear;var currentHour;var currentMinute;var calendarContentDiv;var returnDateTo;var returnFormat;var activeSelectBoxMonth;var activeSelectBoxYear;var activeSelectBoxHour;var activeSelectBoxMinute;var iframeObj=false;var iframeObj2=false;function EIS_FIX_EI1(where2fixit)
{if(!iframeObj2)return;iframeObj2.style.display='block';iframeObj2.style.height=document.getElementById(where2fixit).offsetHeight+1;iframeObj2.style.width=document.getElementById(where2fixit).offsetWidth;iframeObj2.style.left=getleftPos(document.getElementById(where2fixit))+1-calendar_offsetLeft;iframeObj2.style.top=getTopPos(document.getElementById(where2fixit))-document.getElementById(where2fixit).offsetHeight-calendar_offsetTop;}
function EIS_Hide_Frame()
{if(iframeObj2)iframeObj2.style.display='none';}
var returnDateToYear;var returnDateToMonth;var returnDateToDay;var returnDateToHour;var returnDateToMinute;var inputYear;var inputMonth;var inputDay;var inputHour;var inputMinute;var calendarDisplayTime=false;var selectBoxHighlightColor='#D60808';var selectBoxRolloverBgColor='#E2EBED';var selectBoxMovementInProgress=false;var activeSelectBox=false;function cancelCalendarEvent()
{return false;}
function isLeapYear(inputYear)
{if(inputYear%400==0||(inputYear%4==0&&inputYear%100!=0))return true;return false;}
var activeSelectBoxMonth=false;var activeSelectBoxDirection=false;function highlightMonthYear()
{if(activeSelectBoxMonth)activeSelectBoxMonth.className='';activeSelectBox=this;if(this.className=='monthYearActive'){this.className='';}else{this.className='monthYearActive';activeSelectBoxMonth=this;}
if(this.innerHTML.indexOf('-')>=0||this.innerHTML.indexOf('+')>=0){if(this.className=='monthYearActive')
selectBoxMovementInProgress=true;else
selectBoxMovementInProgress=false;if(this.innerHTML.indexOf('-')>=0)activeSelectBoxDirection=-1;else activeSelectBoxDirection=1;}else selectBoxMovementInProgress=false;}
function showMonthDropDown()
{if(document.getElementById('monthDropDown').style.display=='block'){document.getElementById('monthDropDown').style.display='none';EIS_Hide_Frame();}else{document.getElementById('monthDropDown').style.display='block';document.getElementById('yearDropDown').style.display='none';document.getElementById('hourDropDown').style.display='none';document.getElementById('minuteDropDown').style.display='none';if(MSIE)
{EIS_FIX_EI1('monthDropDown')}}}
function showYearDropDown()
{if(document.getElementById('yearDropDown').style.display=='block'){document.getElementById('yearDropDown').style.display='none';EIS_Hide_Frame();}else{document.getElementById('yearDropDown').style.display='block';document.getElementById('monthDropDown').style.display='none';document.getElementById('hourDropDown').style.display='none';document.getElementById('minuteDropDown').style.display='none';if(MSIE)
{EIS_FIX_EI1('yearDropDown')}}}
function showHourDropDown()
{if(document.getElementById('hourDropDown').style.display=='block'){document.getElementById('hourDropDown').style.display='none';EIS_Hide_Frame();}else{document.getElementById('hourDropDown').style.display='block';document.getElementById('monthDropDown').style.display='none';document.getElementById('yearDropDown').style.display='none';document.getElementById('minuteDropDown').style.display='none';if(MSIE)
{EIS_FIX_EI1('hourDropDown')}}}
function showMinuteDropDown()
{if(document.getElementById('minuteDropDown').style.display=='block'){document.getElementById('minuteDropDown').style.display='none';EIS_Hide_Frame();}else{document.getElementById('minuteDropDown').style.display='block';document.getElementById('monthDropDown').style.display='none';document.getElementById('yearDropDown').style.display='none';document.getElementById('hourDropDown').style.display='none';if(MSIE)
{EIS_FIX_EI1('minuteDropDown')}}}
function selectMonth()
{document.getElementById('calendar_month_txt').innerHTML=this.innerHTML
currentMonth=this.id.replace(/[^\d]/g,'');document.getElementById('monthDropDown').style.display='none';EIS_Hide_Frame();for(var no=0;no<monthArray.length;no++){document.getElementById('monthDiv_'+no).style.color='';}
this.style.color=selectBoxHighlightColor;activeSelectBoxMonth=this;writeCalendarContent();}
function selectHour()
{document.getElementById('calendar_hour_txt').innerHTML=this.innerHTML
currentHour=this.innerHTML.replace(/[^\d]/g,'');document.getElementById('hourDropDown').style.display='none';EIS_Hide_Frame();if(activeSelectBoxHour){activeSelectBoxHour.style.color='';}
activeSelectBoxHour=this;this.style.color=selectBoxHighlightColor;}
function selectMinute()
{document.getElementById('calendar_minute_txt').innerHTML=this.innerHTML
currentMinute=this.innerHTML.replace(/[^\d]/g,'');document.getElementById('minuteDropDown').style.display='none';EIS_Hide_Frame();if(activeSelectBoxMinute){activeSelectBoxMinute.style.color='';}
activeSelectBoxMinute=this;this.style.color=selectBoxHighlightColor;}
function selectYear()
{document.getElementById('calendar_year_txt').innerHTML=this.innerHTML
currentYear=this.innerHTML.replace(/[^\d]/g,'');document.getElementById('yearDropDown').style.display='none';EIS_Hide_Frame();if(activeSelectBoxYear){activeSelectBoxYear.style.color='';}
activeSelectBoxYear=this;this.style.color=selectBoxHighlightColor;writeCalendarContent();}
function switchMonth()
{if(this.src.indexOf('left')>=0){currentMonth=currentMonth-1;;if(currentMonth<0){currentMonth=11;currentYear=currentYear-1;}}else{currentMonth=currentMonth+1;;if(currentMonth>11){currentMonth=0;currentYear=currentYear/1+1;}}
writeCalendarContent();}
function createMonthDiv(){var div=document.createElement('DIV');div.className='monthYearPicker';div.id='monthPicker';for(var no=0;no<monthArray.length;no++){var subDiv=document.createElement('DIV');subDiv.innerHTML=monthArray[no];subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=highlightMonthYear;subDiv.onclick=selectMonth;subDiv.id='monthDiv_'+no;subDiv.style.width='56px';subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);if(currentMonth&&currentMonth==no){subDiv.style.color=selectBoxHighlightColor;activeSelectBoxMonth=subDiv;}}
return div;}
function changeSelectBoxYear(e,inputObj)
{if(!inputObj)inputObj=this;var yearItems=inputObj.parentNode.getElementsByTagName('DIV');if(inputObj.innerHTML.indexOf('-')>=0){var startYear=yearItems[1].innerHTML/1-1;if(activeSelectBoxYear){activeSelectBoxYear.style.color='';}}else{var startYear=yearItems[1].innerHTML/1+1;if(activeSelectBoxYear){activeSelectBoxYear.style.color='';}}
for(var no=1;no<yearItems.length-1;no++){yearItems[no].innerHTML=startYear+no-1;yearItems[no].id='yearDiv'+(startYear/1+no/1-1);}
if(activeSelectBoxYear){activeSelectBoxYear.style.color='';if(document.getElementById('yearDiv'+currentYear)){activeSelectBoxYear=document.getElementById('yearDiv'+currentYear);activeSelectBoxYear.style.color=selectBoxHighlightColor;;}}}
function changeSelectBoxHour(e,inputObj)
{if(!inputObj)inputObj=this;var hourItems=inputObj.parentNode.getElementsByTagName('DIV');if(inputObj.innerHTML.indexOf('-')>=0){var startHour=hourItems[1].innerHTML/1-1;if(startHour<0)startHour=0;if(activeSelectBoxHour){activeSelectBoxHour.style.color='';}}else{var startHour=hourItems[1].innerHTML/1+1;if(startHour>14)startHour=14;if(activeSelectBoxHour){activeSelectBoxHour.style.color='';}}
var prefix='';for(var no=1;no<hourItems.length-1;no++){if((startHour/1+no/1)<11)prefix='0';else prefix='';hourItems[no].innerHTML=prefix+(startHour+no-1);hourItems[no].id='hourDiv'+(startHour/1+no/1-1);}
if(activeSelectBoxHour){activeSelectBoxHour.style.color='';if(document.getElementById('hourDiv'+currentHour)){activeSelectBoxHour=document.getElementById('hourDiv'+currentHour);activeSelectBoxHour.style.color=selectBoxHighlightColor;;}}}
function updateYearDiv()
{var yearSpan=5;if(turnOffYearSpan){yearSpan=0;}
var div=document.getElementById('yearDropDown');var yearItems=div.getElementsByTagName('DIV');for(var no=1;no<yearItems.length-1;no++){yearItems[no].innerHTML=currentYear/1-yearSpan+no;if(currentYear==(currentYear/1-yearSpan+no)){yearItems[no].style.color=selectBoxHighlightColor;activeSelectBoxYear=yearItems[no];}else{yearItems[no].style.color='';}}}
function updateMonthDiv()
{for(no=0;no<12;no++){document.getElementById('monthDiv_'+no).style.color='';}
document.getElementById('monthDiv_'+currentMonth).style.color=selectBoxHighlightColor;activeSelectBoxMonth=document.getElementById('monthDiv_'+currentMonth);}
function updateHourDiv()
{var div=document.getElementById('hourDropDown');var hourItems=div.getElementsByTagName('DIV');var addHours=0;if((currentHour/1-6+1)<0){addHours=(currentHour/1-6+1)*-1;}
for(var no=1;no<hourItems.length-1;no++){var prefix='';if((currentHour/1-6+no+addHours)<10)prefix='0';hourItems[no].innerHTML=prefix+(currentHour/1-6+no+addHours);if(currentHour==(currentHour/1-6+no)){hourItems[no].style.color=selectBoxHighlightColor;activeSelectBoxHour=hourItems[no];}else{hourItems[no].style.color='';}}}
function updateMinuteDiv()
{for(no=0;no<60;no+=intervalSelectBox_minutes){var prefix='';if(no<10)prefix='0';document.getElementById('minuteDiv_'+prefix+no).style.color='';}
if(document.getElementById('minuteDiv_'+currentMinute)){document.getElementById('minuteDiv_'+currentMinute).style.color=selectBoxHighlightColor;activeSelectBoxMinute=document.getElementById('minuteDiv_'+currentMinute);}}
function createYearDiv()
{if(!document.getElementById('yearDropDown')){var div=document.createElement('DIV');div.className='monthYearPicker';}else{var div=document.getElementById('yearDropDown');var subDivs=div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}
var d=new Date();if(currentYear){d.setFullYear(currentYear);}
var startYear=d.getFullYear()/1-5;var yearSpan=10;if(!turnOffYearSpan){var subDiv=document.createElement('DIV');subDiv.innerHTML='&nbsp;&nbsp;- ';subDiv.onclick=changeSelectBoxYear;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=function(){selectBoxMovementInProgress=false;};subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);}else{startYear=d.getFullYear()/1-0;yearSpan=2;}
for(var no=startYear;no<(startYear+yearSpan);no++){var subDiv=document.createElement('DIV');subDiv.innerHTML=no;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=highlightMonthYear;subDiv.onclick=selectYear;subDiv.id='yearDiv'+no;subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);if(currentYear&&currentYear==no){subDiv.style.color=selectBoxHighlightColor;activeSelectBoxYear=subDiv;}}
if(!turnOffYearSpan){var subDiv=document.createElement('DIV');subDiv.innerHTML='&nbsp;&nbsp;+ ';subDiv.onclick=changeSelectBoxYear;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=function(){selectBoxMovementInProgress=false;};subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);}
return div;}
function slideCalendarSelectBox()
{if(selectBoxMovementInProgress){if(activeSelectBox.parentNode.id=='hourDropDown'){changeSelectBoxHour(false,activeSelectBox);}
if(activeSelectBox.parentNode.id=='yearDropDown'){changeSelectBoxYear(false,activeSelectBox);}}
setTimeout('slideCalendarSelectBox()',speedOfSelectBoxSliding);}
function createHourDiv()
{if(!document.getElementById('hourDropDown')){var div=document.createElement('DIV');div.className='monthYearPicker';}else{var div=document.getElementById('hourDropDown');var subDivs=div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}
if(!currentHour)currentHour=0;var startHour=currentHour/1;if(startHour>14)startHour=14;var subDiv=document.createElement('DIV');subDiv.innerHTML='&nbsp;&nbsp;- ';subDiv.onclick=changeSelectBoxHour;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=function(){selectBoxMovementInProgress=false;};subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);for(var no=startHour;no<startHour+10;no++){var prefix='';if(no/1<10)prefix='0';var subDiv=document.createElement('DIV');subDiv.innerHTML=prefix+no;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=highlightMonthYear;subDiv.onclick=selectHour;subDiv.id='hourDiv'+no;subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);if(currentYear&&currentYear==no){subDiv.style.color=selectBoxHighlightColor;activeSelectBoxYear=subDiv;}}
var subDiv=document.createElement('DIV');subDiv.innerHTML='&nbsp;&nbsp;+ ';subDiv.onclick=changeSelectBoxHour;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=function(){selectBoxMovementInProgress=false;};subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);return div;}
function createMinuteDiv()
{if(!document.getElementById('minuteDropDown')){var div=document.createElement('DIV');div.className='monthYearPicker';}else{var div=document.getElementById('minuteDropDown');var subDivs=div.getElementsByTagName('DIV');for(var no=0;no<subDivs.length;no++){subDivs[no].parentNode.removeChild(subDivs[no]);}}
var startMinute=0;var prefix='';for(var no=startMinute;no<60;no+=intervalSelectBox_minutes){if(no<10)prefix='0';else prefix='';var subDiv=document.createElement('DIV');subDiv.innerHTML=prefix+no;subDiv.onmouseover=highlightMonthYear;subDiv.onmouseout=highlightMonthYear;subDiv.onclick=selectMinute;subDiv.id='minuteDiv_'+prefix+no;subDiv.onselectstart=cancelCalendarEvent;div.appendChild(subDiv);if(currentYear&&currentYear==no){subDiv.style.color=selectBoxHighlightColor;activeSelectBoxYear=subDiv;}}
return div;}
function highlightSelect()
{if(this.className=='selectBoxTime'){this.className='selectBoxTimeOver';this.getElementsByTagName('IMG')[0].src=pathToImages+'down_time_over.gif';}else if(this.className=='selectBoxTimeOver'){this.className='selectBoxTime';this.getElementsByTagName('IMG')[0].src=pathToImages+'down_time.gif';}
if(this.className=='selectBox'){this.className='selectBoxOver';this.getElementsByTagName('IMG')[0].src=pathToImages+'down_over.gif';}else if(this.className=='selectBoxOver'){this.className='selectBox';this.getElementsByTagName('IMG')[0].src=pathToImages+'down.gif';}}
function highlightArrow()
{if(this.src.indexOf('over')>=0){if(this.src.indexOf('left')>=0)this.src=pathToImages+'left.gif';if(this.src.indexOf('right')>=0)this.src=pathToImages+'right.gif';}else{if(this.src.indexOf('left')>=0)this.src=pathToImages+'left_over.gif';if(this.src.indexOf('right')>=0)this.src=pathToImages+'right_over.gif';}}
function highlightClose()
{if(this.src.indexOf('over')>=0){this.src=pathToImages+'close_calender.gif';}else{this.src=pathToImages+'close_calender.gif';}}
function closeCalendar(){document.getElementById('yearDropDown').style.display='none';document.getElementById('monthDropDown').style.display='none';document.getElementById('hourDropDown').style.display='none';document.getElementById('minuteDropDown').style.display='none';calendarDiv.style.display='none';if(iframeObj){iframeObj.style.display='none';EIS_Hide_Frame();}
if(activeSelectBoxMonth)activeSelectBoxMonth.className='';if(activeSelectBoxYear)activeSelectBoxYear.className='';}
function writeTopBar()
{var topBar=document.createElement('DIV');topBar.className='topBar';topBar.id='topBar';calendarDiv.appendChild(topBar);var leftDiv=document.createElement('DIV');leftDiv.style.marginRight='1px';var img=document.createElement('IMG');img.src=pathToImages+'left.gif';img.onmouseover=highlightArrow;img.onclick=switchMonth;img.onmouseout=highlightArrow;leftDiv.appendChild(img);topBar.appendChild(leftDiv);if(Opera)leftDiv.style.width='16px';var rightDiv=document.createElement('DIV');rightDiv.style.marginRight='1px';var img=document.createElement('IMG');img.src=pathToImages+'right.gif';img.onclick=switchMonth;img.onmouseover=highlightArrow;img.onmouseout=highlightArrow;rightDiv.appendChild(img);if(Opera)rightDiv.style.width='16px';topBar.appendChild(rightDiv);var monthDiv=document.createElement('DIV');monthDiv.id='monthSelect';monthDiv.onmouseover=highlightSelect;monthDiv.onmouseout=highlightSelect;monthDiv.onclick=showMonthDropDown;var span=document.createElement('SPAN');span.innerHTML=monthArray[currentMonth];span.id='calendar_month_txt';monthDiv.appendChild(span);var img=document.createElement('IMG');img.src=pathToImages+'down.gif';img.style.position='absolute';img.style.right='0px';monthDiv.appendChild(img);monthDiv.className='selectBox';if(Opera){img.style.cssText='float:right;position:relative';img.style.position='relative';img.style.styleFloat='right';}
topBar.appendChild(monthDiv);var monthPicker=createMonthDiv();monthPicker.style.left='37px';monthPicker.style.top=monthDiv.offsetTop+monthDiv.offsetHeight+1+'px';monthPicker.style.width='60px';monthPicker.id='monthDropDown';calendarDiv.appendChild(monthPicker);var yearDiv=document.createElement('DIV');yearDiv.onmouseover=highlightSelect;yearDiv.onmouseout=highlightSelect;yearDiv.onclick=showYearDropDown;var span=document.createElement('SPAN');span.innerHTML=currentYear;span.id='calendar_year_txt';yearDiv.appendChild(span);topBar.appendChild(yearDiv);var img=document.createElement('IMG');img.src=pathToImages+'down.gif';yearDiv.appendChild(img);yearDiv.className='selectBox';if(Opera){yearDiv.style.width='50px';img.style.cssText='float:right';img.style.position='relative';img.style.styleFloat='right';}
var yearPicker=createYearDiv();yearPicker.style.left='113px';yearPicker.style.top=monthDiv.offsetTop+monthDiv.offsetHeight+1+'px';yearPicker.style.width='35px';yearPicker.id='yearDropDown';calendarDiv.appendChild(yearPicker);var img=document.createElement('IMG');img.src=pathToImages+'close_calender.gif';img.style.styleFloat='right';img.onmouseover=highlightClose;img.onmouseout=highlightClose;img.onclick=closeCalendar;topBar.appendChild(img);if(!document.all){img.style.position='absolute';img.style.right='2px';}}
function writeCalendarContent()
{var calendarContentDivExists=true;if(!calendarContentDiv){calendarContentDiv=document.createElement('DIV');calendarDiv.appendChild(calendarContentDiv);calendarContentDivExists=false;}
currentMonth=currentMonth/1;var d=new Date();d.setFullYear(currentYear);d.setDate(1);d.setMonth(currentMonth);var dayStartOfMonth=d.getDay();if(!weekStartsOnSunday){if(dayStartOfMonth==0)dayStartOfMonth=7;dayStartOfMonth--;}
document.getElementById('calendar_year_txt').innerHTML=currentYear;document.getElementById('calendar_month_txt').innerHTML=monthArray[currentMonth];document.getElementById('calendar_hour_txt').innerHTML=currentHour;document.getElementById('calendar_minute_txt').innerHTML=currentMinute;var existingTable=calendarContentDiv.getElementsByTagName('TABLE');if(existingTable.length>0){calendarContentDiv.removeChild(existingTable[0]);}
var calTable=document.createElement('TABLE');calTable.width='100%';calTable.cellSpacing='0';calendarContentDiv.appendChild(calTable);var calTBody=document.createElement('TBODY');calTable.appendChild(calTBody);var row=calTBody.insertRow(-1);row.className='calendar_week_row';if(showWeekNumber){var cell=row.insertCell(-1);cell.innerHTML=weekString;cell.className='calendar_week_column';cell.style.backgroundColor=selectBoxRolloverBgColor;}
for(var no=0;no<dayArray.length;no++){var cell=row.insertCell(-1);cell.innerHTML=dayArray[no];}
var row=calTBody.insertRow(-1);if(showWeekNumber){var cell=row.insertCell(-1);cell.className='calendar_week_column';cell.style.backgroundColor=selectBoxRolloverBgColor;var week=getWeek(currentYear,currentMonth,1);cell.innerHTML=week;}
for(var no=0;no<dayStartOfMonth;no++){var cell=row.insertCell(-1);cell.innerHTML='&nbsp;';}
var colCounter=dayStartOfMonth;var daysInMonth=daysInMonthArray[currentMonth];if(daysInMonth==28){if(isLeapYear(currentYear))daysInMonth=29;}
for(var no=1;no<=daysInMonth;no++){d.setDate(no-1);if(colCounter>0&&colCounter%7==0){var row=calTBody.insertRow(-1);if(showWeekNumber){var cell=row.insertCell(-1);cell.className='calendar_week_column';var week=getWeek(currentYear,currentMonth,no);cell.innerHTML=week;cell.style.backgroundColor=selectBoxRolloverBgColor;}}
var cell=row.insertCell(-1);if(currentYear==inputYear&&currentMonth==inputMonth&&no==inputDay){cell.className='activeDay';}
cell.innerHTML=no;cell.onclick=pickDate;colCounter++;}
if(!document.all){if(calendarContentDiv.offsetHeight)
document.getElementById('topBar').style.top=calendarContentDiv.offsetHeight+document.getElementById('timeBar').offsetHeight+document.getElementById('topBar').offsetHeight-1+'px';else{document.getElementById('topBar').style.top='';document.getElementById('topBar').style.bottom='0px';}}
if(iframeObj){if(!calendarContentDivExists)setTimeout('resizeIframe()',350);else setTimeout('resizeIframe()',10);}}
function resizeIframe()
{iframeObj.style.width=calendarDiv.offsetWidth+'px';iframeObj.style.height=calendarDiv.offsetHeight+'px';}
function pickTodaysDate()
{var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();pickDate(false,d.getDate());}
function pickDate(e,inputDay)
{var month=currentMonth/1+1;if(month<10)month='0'+month;var day;if(!inputDay&&this)day=this.innerHTML;else day=inputDay;if(day/1<10)day='0'+day;if(returnFormat){returnFormat=returnFormat.replace('dd',day);returnFormat=returnFormat.replace('mm',month);returnFormat=returnFormat.replace('yyyy',currentYear);returnFormat=returnFormat.replace('hh',currentHour);returnFormat=returnFormat.replace('ii',currentMinute);returnFormat=returnFormat.replace('d',day/1);returnFormat=returnFormat.replace('m',month/1);returnDateTo.value=returnFormat;try{returnDateTo.onchange();}catch(e){}}else{for(var no=0;no<returnDateToYear.options.length;no++){if(returnDateToYear.options[no].value==currentYear){returnDateToYear.selectedIndex=no;break;}}
for(var no=0;no<returnDateToMonth.options.length;no++){if(returnDateToMonth.options[no].value==parseInt(month)){returnDateToMonth.selectedIndex=no;break;}}
for(var no=0;no<returnDateToDay.options.length;no++){if(returnDateToDay.options[no].value==parseInt(day)){returnDateToDay.selectedIndex=no;break;}}
if(calendarDisplayTime){for(var no=0;no<returnDateToHour.options.length;no++){if(returnDateToHour.options[no].value==parseInt(currentHour)){returnDateToHour.selectedIndex=no;break;}}
for(var no=0;no<returnDateToMinute.options.length;no++){if(returnDateToMinute.options[no].value==parseInt(currentMinute)){returnDateToMinute.selectedIndex=no;break;}}}}
closeCalendar();}
function getWeek(year,month,day){if(!weekStartsOnSunday){day=(day/1);}else{day=(day/1)+1;}
year=year/1;month=month/1+1;var a=Math.floor((14-(month))/12);var y=year+4800-a;var m=(month)+(12*a)-3;var jd=day+Math.floor(((153*m)+2)/5)+(365*y)+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400)-32045;var d4=(jd+31741-(jd%7))%146097%36524%1461;var L=Math.floor(d4/1460);var d1=((d4-L)%365)+L;NumberOfWeek=Math.floor(d1/7)+1;return NumberOfWeek;}
function writeTimeBar()
{var timeBar=document.createElement('DIV');timeBar.id='timeBar';timeBar.className='timeBar';var subDiv=document.createElement('DIV');subDiv.innerHTML='Time:';var hourDiv=document.createElement('DIV');hourDiv.onmouseover=highlightSelect;hourDiv.onmouseout=highlightSelect;hourDiv.onclick=showHourDropDown;hourDiv.style.width='30px';var span=document.createElement('SPAN');span.innerHTML=currentHour;span.id='calendar_hour_txt';hourDiv.appendChild(span);timeBar.appendChild(hourDiv);var img=document.createElement('IMG');img.src=pathToImages+'down_time.gif';hourDiv.appendChild(img);hourDiv.className='selectBoxTime';if(Opera){hourDiv.style.width='30px';img.style.cssText='float:right';img.style.position='relative';img.style.styleFloat='right';}
var hourPicker=createHourDiv();hourPicker.style.left='130px';hourPicker.style.width='35px';hourPicker.id='hourDropDown';calendarDiv.appendChild(hourPicker);var minuteDiv=document.createElement('DIV');minuteDiv.onmouseover=highlightSelect;minuteDiv.onmouseout=highlightSelect;minuteDiv.onclick=showMinuteDropDown;minuteDiv.style.width='30px';var span=document.createElement('SPAN');span.innerHTML=currentMinute;span.id='calendar_minute_txt';minuteDiv.appendChild(span);timeBar.appendChild(minuteDiv);var img=document.createElement('IMG');img.src=pathToImages+'down_time.gif';minuteDiv.appendChild(img);minuteDiv.className='selectBoxTime';if(Opera){minuteDiv.style.width='30px';img.style.cssText='float:right';img.style.position='relative';img.style.styleFloat='right';}
var minutePicker=createMinuteDiv();minutePicker.style.left='167px';minutePicker.style.width='35px';minutePicker.id='minuteDropDown';calendarDiv.appendChild(minutePicker);return timeBar;}
function writeBottomBar()
{var d=new Date();var bottomBar=document.createElement('DIV');bottomBar.id='bottomBar';bottomBar.style.cursor='pointer';bottomBar.className='todaysDate';var subDiv=document.createElement('DIV');subDiv.onclick=pickTodaysDate;subDiv.id='todaysDateString';subDiv.style.width=(calendarDiv.offsetWidth-95)+'px';var day=d.getDay();if(!weekStartsOnSunday){if(day==0)day=7;day--;}
var bottomString=todayStringFormat;bottomString=bottomString.replace('[monthString]',monthArrayShort[d.getMonth()]);bottomString=bottomString.replace('[day]',d.getDate());bottomString=bottomString.replace('[year]',d.getFullYear());bottomString=bottomString.replace('[dayString]',dayArray[day].toLowerCase());bottomString=bottomString.replace('[UCFdayString]',dayArray[day]);bottomString=bottomString.replace('[todayString]',todayString);subDiv.innerHTML=todayString+': '+d.getDate()+'. '+monthArrayShort[d.getMonth()]+', '+d.getFullYear();subDiv.innerHTML=bottomString;bottomBar.appendChild(subDiv);var timeDiv=writeTimeBar();bottomBar.appendChild(timeDiv);calendarDiv.appendChild(bottomBar);}
function getTopPos(inputObj)
{var returnValue=inputObj.offsetTop+inputObj.offsetHeight;while((inputObj=inputObj.offsetParent)!=null)returnValue+=inputObj.offsetTop;return returnValue+calendar_offsetTop;}
function getleftPos(inputObj)
{var returnValue=inputObj.offsetLeft;while((inputObj=inputObj.offsetParent)!=null)returnValue+=inputObj.offsetLeft;return returnValue+calendar_offsetLeft;}
function positionCalendar(inputObj)
{calendarDiv.style.left=getleftPos(inputObj)+'px';calendarDiv.style.top=getTopPos(inputObj)+'px';if(iframeObj){iframeObj.style.left=calendarDiv.style.left;iframeObj.style.top=calendarDiv.style.top;iframeObj2.style.left=calendarDiv.style.left;iframeObj2.style.top=calendarDiv.style.top;}}
function initCalendar()
{if(MSIE){iframeObj=document.createElement('IFRAME');iframeObj.style.filter='alpha(opacity=0)';iframeObj.style.position='absolute';iframeObj.border='0px';iframeObj.style.border='0px';iframeObj.style.backgroundColor='#FF0000';iframeObj2=document.createElement('IFRAME');iframeObj2.style.position='absolute';iframeObj2.border='0px';iframeObj2.style.border='0px';iframeObj2.style.height='1px';iframeObj2.style.width='1px';iframeObj2.src='blank.html';iframeObj.src='blank.html';document.body.appendChild(iframeObj2);document.body.appendChild(iframeObj);}
calendarDiv=document.createElement('DIV');calendarDiv.id='calendarDiv';calendarDiv.style.zIndex=1000;slideCalendarSelectBox();document.body.appendChild(calendarDiv);writeBottomBar();writeTopBar();if(!currentYear){var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();}
writeCalendarContent();}
function setTimeProperties()
{if(!calendarDisplayTime){document.getElementById('timeBar').style.display='none';document.getElementById('timeBar').style.visibility='hidden';document.getElementById('todaysDateString').style.width='100%';}else{document.getElementById('timeBar').style.display='block';document.getElementById('timeBar').style.visibility='visible';document.getElementById('hourDropDown').style.top=document.getElementById('calendar_minute_txt').parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById('topBar').offsetHeight+'px';document.getElementById('minuteDropDown').style.top=document.getElementById('calendar_minute_txt').parentNode.offsetHeight+calendarContentDiv.offsetHeight+document.getElementById('topBar').offsetHeight+'px';document.getElementById('minuteDropDown').style.right='50px';document.getElementById('hourDropDown').style.right='50px';document.getElementById('todaysDateString').style.width='115px';}}
function calendarSortItems(a,b)
{return a/1-b/1;}
function displayCalendar(inputField,format,buttonObj,displayTime,timeInput)
{if(displayTime)calendarDisplayTime=true;else calendarDisplayTime=false;if(inputField.value.length>6){if(!inputField.value.match(/^[0-9]*?$/gi)){var items=inputField.value.split(/[^0-9]/gi);var positionArray=new Array();positionArray['m']=format.indexOf('mm');if(positionArray['m']==-1)positionArray['m']=format.indexOf('m');positionArray['d']=format.indexOf('dd');if(positionArray['d']==-1)positionArray['d']=format.indexOf('d');positionArray['y']=format.indexOf('yyyy');positionArray['h']=format.indexOf('hh');positionArray['i']=format.indexOf('ii');var positionArrayNumeric=Array();positionArrayNumeric[0]=positionArray['m'];positionArrayNumeric[1]=positionArray['d'];positionArrayNumeric[2]=positionArray['y'];positionArrayNumeric[3]=positionArray['h'];positionArrayNumeric[4]=positionArray['i'];positionArrayNumeric=positionArrayNumeric.sort(calendarSortItems);var itemIndex=-1;currentHour='00';currentMinute='00';for(var no=0;no<positionArrayNumeric.length;no++){if(positionArrayNumeric[no]==-1)continue;itemIndex++;if(positionArrayNumeric[no]==positionArray['m']){currentMonth=items[itemIndex]-1;continue;}
if(positionArrayNumeric[no]==positionArray['y']){currentYear=items[itemIndex];continue;}
if(positionArrayNumeric[no]==positionArray['d']){tmpDay=items[itemIndex];continue;}
if(positionArrayNumeric[no]==positionArray['h']){currentHour=items[itemIndex];continue;}
if(positionArrayNumeric[no]==positionArray['i']){currentMinute=items[itemIndex];continue;}}
currentMonth=currentMonth/1;tmpDay=tmpDay/1;}else{var monthPos=format.indexOf('mm');currentMonth=inputField.value.substr(monthPos,2)/1-1;var yearPos=format.indexOf('yyyy');currentYear=inputField.value.substr(yearPos,4);var dayPos=format.indexOf('dd');tmpDay=inputField.value.substr(dayPos,2);var hourPos=format.indexOf('hh');if(hourPos>=0){tmpHour=inputField.value.substr(hourPos,2);currentHour=tmpHour;}else{currentHour='00';}
var minutePos=format.indexOf('ii');if(minutePos>=0){tmpMinute=inputField.value.substr(minutePos,2);currentMinute=tmpMinute;}else{currentMinute='00';}}}else{var d=new Date();currentMonth=d.getMonth();currentYear=d.getFullYear();currentHour='08';currentMinute='00';tmpDay=d.getDate();}
inputYear=currentYear;inputMonth=currentMonth;inputDay=tmpDay/1;if(!calendarDiv){initCalendar();}else{if(calendarDiv.style.display=='block'){closeCalendar();return false;}
writeCalendarContent();}
returnFormat=format;returnDateTo=inputField;positionCalendar(buttonObj);calendarDiv.style.visibility='visible';calendarDiv.style.display='block';if(iframeObj){iframeObj.style.display='';iframeObj.style.height='140px';iframeObj.style.width='195px';iframeObj2.style.display='';iframeObj2.style.height='140px';iframeObj2.style.width='195px';}
setTimeProperties();updateYearDiv();updateMonthDiv();updateMinuteDiv();updateHourDiv();}
function displayCalendarSelectBox(yearInput,monthInput,dayInput,hourInput,minuteInput,buttonObj)
{if(!hourInput)calendarDisplayTime=false;else calendarDisplayTime=true;currentMonth=monthInput.options[monthInput.selectedIndex].value/1-1;currentYear=yearInput.options[yearInput.selectedIndex].value;if(hourInput){currentHour=hourInput.options[hourInput.selectedIndex].value;inputHour=currentHour/1;}
if(minuteInput){currentMinute=minuteInput.options[minuteInput.selectedIndex].value;inputMinute=currentMinute/1;}
inputYear=yearInput.options[yearInput.selectedIndex].value;inputMonth=monthInput.options[monthInput.selectedIndex].value/1-1;inputDay=dayInput.options[dayInput.selectedIndex].value/1;if(!calendarDiv){initCalendar();}else{writeCalendarContent();}
returnDateToYear=yearInput;returnDateToMonth=monthInput;returnDateToDay=dayInput;returnDateToHour=hourInput;returnDateToMinute=minuteInput;returnFormat=false;returnDateTo=false;positionCalendar(buttonObj);calendarDiv.style.visibility='visible';calendarDiv.style.display='block';if(iframeObj){iframeObj.style.display='';iframeObj.style.height=calendarDiv.offsetHeight+'px';iframeObj.style.width=calendarDiv.offsetWidth+'px';iframeObj2.style.display='';iframeObj2.style.height=calendarDiv.offsetHeight+'px';iframeObj2.style.width=calendarDiv.offsetWidth+'px'}
setTimeProperties();updateYearDiv();updateMonthDiv();updateHourDiv();updateMinuteDiv();}
function closeMessage(msgdiv)
{document.getElementById(msgdiv).innerHTML='';}
function isBlank(fieldId,message)
{var fieldName=trim(document.getElementById(fieldId).value);if(fieldName=='')
{return message;}
else
return"";}
function isBetweenNumber(fieldId,message,lowerLimit,upperLimit)
{var fieldName=document.getElementById(fieldId).value;if(fieldName>=lowerLimit&&fieldName<=upperLimit)
{return"";}
else
return message;}
function comparePasswordConfirmPassword(passwordValue,passwordValue,message)
{if(passwordValue==passwordValue)
{return"";}
else
return message;}
function ischeckboxConfirm(field,message)
{if(field==false)
{return message;}
else
return"";}
function isCharacter(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;if(fieldName.match(/^[a-zA-Z ]+$/))
{return"";}
else
return message;}
function isSpecialCharacter(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;if(fieldName.match(/[&<>+@#$%*]+/))
{return message;}
else
return"";}
function isFirstCharBlank(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;if(fieldName.charAt(0)==' ')
{return message;}
else
return"";}
function isNumeric(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;var checkOK="0123456789";var checkStr=fieldName;var allValid=true;var allNum="";var j;var i;for(i=0;i<fieldName.length;i++)
{ch=fieldName.charAt(i);for(j=0;j<checkOK.length;j++)
{if(ch==checkOK.charAt(j))
{break;}}
if(j==checkOK.length)
{allValid=false;break;}
if(!allValid)
{allValid=false;}}
if(allValid==true)
return"";else
return message;}
function isEmail(fieldId,msg){var str=document.getElementById(fieldId).value;var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
var noOfDots=(str.split(".").length-1);if(noOfDots>2)
{return msg;}
if(str.indexOf(at)==-1){return msg;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return msg;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return msg;}
if(str.indexOf(at,(lat+1))!=-1){return msg;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return msg;}
if(str.indexOf(dot,(lat+2))==-1){return msg;}
if(str.indexOf(" ")!=-1){return msg;}
if(str.indexOf('"')!=-1){return msg;}
return"";}
function isDecimal(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;var ValidChars="0123456789.";var IsNumber=0;var Char;var check=0;for(i=0;i<fieldName.length&&IsNumber==0;i++)
{Char=fieldName.charAt(i);if(Char=='.')
{check++;}
if(ValidChars.indexOf(Char)==-1)
{IsNumber=1;}}
if(check>1)
{IsNumber=2;}
if(IsNumber==0)
{return"";}
else
{return message;}}
function isDate(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;var pattern=new RegExp(/^\d{4}\-\d{2}\-\d{2}$/);if(document.getElementById(fieldName).value.match(pattern))
{var date_array=document.getElementById(fieldName).value.split('-');var day=date_array[2];var month=date_array[1]-1;var year=date_array[0];source_date=new Date(year,month,day);if(year!=source_date.getFullYear())
{return message;}
if(month!=source_date.getMonth())
{return message;}
if(day!=source_date.getDate())
{return message;}}
else
{return message;}
return"";}
function displayMessage(labelID,message,status)
{if(isJavascriptAlert=="Y"||isAlertEnabled=="Y")
{alert(message);}
else
{var label=document.getElementById(labelID);label.innerHTML=message;if(label.innerHTML==null)
{label.visible=false;}
else
{label.style.visibility="visible";if(status=="2")
{label.style.color="red";}
if(status=="1")
{label.style.color="green";}
if(status=="0")
{label.style.color="red";}
if(status=="3")
{label.style.color="white";}}}}
function LTrimStr(value)
{var re=/\s*((\S+\s*)*)/;return value.replace(re,"$1");}
function RTrimStr(value){var re=/((\s*\S+)*)\s*/;return value.replace(re,"$1");}
function trim(argString)
{return LTrimStr(RTrimStr(argString));}
function comparePasswordConfirmPassword(passwordValue1,passwordValue2,message)
{var fieldName1=document.getElementById(passwordValue1).value;var fieldName2=document.getElementById(passwordValue2).value;if(fieldName1==fieldName2)
{return"";}
else
return message;}
function trimFieldValue(fieldId)
{document.getElementById(fieldId).value=trim(document.getElementById(fieldId).value);}
function isImageFile(fieldId,message)
{if(document.getElementById(fieldId).value.lastIndexOf(".jpg")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".JPG")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".jpeg")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".JPEG")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".bmp")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".BMP")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".gif")!=-1)
{return'';}
else if(document.getElementById(fieldId).value.lastIndexOf(".GIF")!=-1)
{return'';}
else
{return message;}}
function isEqual(field1,field2,message)
{if(document.getElementById(field1).value==document.getElementById(field2).value)
{return"";}
else
return message;}
function setfocusToField(field1)
{document.getElementById(field1).focus();}
function isPhonrNumber(fieldId,message)
{var fieldName_1=document.getElementById(fieldId+'_1').value;var fieldName_2=document.getElementById(fieldId+'_2').value;var fieldName_3=document.getElementById(fieldId+'_3').value;Char=fieldName_1.charAt(0);if(fieldName_1.match(/^[0-9]+$/)&&fieldName_2.match(/^[0-9]+$/)&&fieldName_3.match(/^[0-9]+$/))
{return'';}
else
{return message;}}
function isUserName(fieldId,message)
{var fieldName=document.getElementById(fieldId).value;if(fieldName.match(/^[0-9a-zA-Z_]+$/))
{return"";}
else
return message;}
function IsDecimal1(fieldId,message)
{var mystring=document.getElementById(fieldId).value;if(mystring.match(/^\d+$|^\d+\.\d{2}$/))
{return"";}
else
{return message;}}
function isEmailValid(strid,message)
{var str=document.getElementById(strid).value;var my_array=str.split('@');var countDot=0;var aftAtTheRate=my_array[1];for(var i=0;i<aftAtTheRate.length;i++)
{if(aftAtTheRate[i]=='.')
{countDot++;}}
if(countDot>2||dotLocation==1)
{return message;}
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
var countDot=0;var dotLocation=0;if(str.indexOf(at)==-1)
{return message;}
else if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr)
{return message;}
else if(str.charAt(lstr-1)==".")
{return message;}
else if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr)
{return message;}
else if(str.indexOf(at,(lat+1))!=-1)
{return message;}
else if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot)
{return message;}
else if(str.indexOf(dot,(lat+2))==-1)
{return message;}
else if(str.indexOf(" ")!=-1)
{return message;}
else if(str.indexOf('"')!=-1)
{return message;}
else if(str.indexOf("'")!=-1)
{return message;}
else
{return"";}}
function onMouseOverRow(trId)
{if(document.getElementById(trId).className=='oddRow')
document.getElementById(trId).className='overRow';else if(document.getElementById(trId).className=='evenRow')
document.getElementById(trId).className='overRow';}
function onMouseOutRow(trId,rowNum)
{if(rowNum%2==0)
document.getElementById(trId).className='oddRow';else
document.getElementById(trId).className='evenRow';}
function onMouseOverItemList(trId)
{if(document.getElementById(trId).className=='border1 oddRow')
document.getElementById(trId).className='border1 overRow';else if(document.getElementById(trId).className=='border1 evenRow')
document.getElementById(trId).className='border1 overRow';}
function onMouseOutItemList(trId,rowNum)
{if(rowNum%2==0)
document.getElementById(trId).className='border1 oddRow';else
document.getElementById(trId).className='border1 evenRow';}
var arAjxXML=new Array(1);var arStopsXML=new Array;function ajFetchXML(url,destination,cycle,delay,noloading){var timerOne=new Date();floatInt=timerOne.getTime();var curInstance;if(cycle==null){cycle=false;}
if(noloading==null){noloading=false;}
if(arAjxXML.length==1){curInstance=1;arAjxXML[1]=new AjaxCreateObjectXML;}else{var found=false;for(i=1;i<arAjxXML.length;i++){if(arAjxXML[i].Is_Free()){curInstance=i;found=true;}}
if(!found){arAjxXML.push(new AjaxCreateObjectXML);curInstance=arAjxXML.length;arAjxXML[curInstance]=new AjaxCreateObjectXML;}}
if(noloading){arAjxXML[curInstance].Set_Loading(false);}
arAjxXML[curInstance].HTTP_Get(url,destination);if(arStopsXML[destination]!=true){if(cycle){setTimeout("ajFetchXML('"+url+"','"+destination+"',true,"+delay+");",delay);}}else{arStopsXML[destination]=null;}}
function AjaxCreateObjectXML(){this.HTTP_Get=HTTP_Get;this.Is_Free=Is_Free;this.Set_Loading=Set_Loading;var ajobj=XMLHTTP_object();var http_destobj=null;var free=true;var show_loading=true;function HTTP_Get(url,destination){if(free&&(url!=null)&&(destination!=null)&&((ajobj.readyState==0)||(ajobj.readyState==4))){http_destobj=destination;ajobj.open("GET",url,true);ajobj.onreadystatechange=HTTP_Get_CallBack;ajobj.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT");ajobj.send(null);free=false;}else{return false;}}
function HTTP_Get_CallBack(){if(ajobj.readyState==4){var results=ajobj.responseXML;if((typeof(results)=='string'||typeof(results)=='object')&&results!=null&&results!=''){if(eval("typeof("+http_destobj+") == 'function'")){eval(http_destobj+"(results);");}else{if(typeof document.getElementById(http_destobj).innerHTML!="undefined"){document.getElementById(http_destobj).innerHTML=results;}}}
free=true;}}
function Is_Free(){return free;}
function Set_Loading(value){show_loading=value;}
function XMLHTTP_object(){var xmlhttp;/*@cc_on
@if(@_jscript_version>=5)
try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(E){xmlhttp=false;}}
@else
xmlhttp=false;@end @*/if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
return xmlhttp;}}
function ajStopXML(destination){arStopsXML[destination]=true;}
(function($){$.mbMenu={actualMenuOpener:false,options:{template:"yourMenuVoiceTemplate",additionalData:"",menuSelector:".menuContainer",menuWidth:150,openOnRight:false,iconPath:"ico/",hasImages:true,fadeInTime:100,fadeOuTime:100,menuTop:0,menuLeft:0,submenuTop:0,submenuLeft:4,opacity:1,shadow:false,shadowColor:"white",openOnClick:true,closeOnMouseOut:false,closeAfter:500,minZindex:"auto",shadowOpacity:.2,onContextualMenu:function(o,e){}},buildMenu:function(options){return this.each(function()
{var thisMenu=this;thisMenu.id=!this.id?"menu_"+Math.floor(Math.random()*1000):this.id;this.options={};$.extend(this.options,$.mbMenu.options);$.extend(this.options,options);$(".menu").hide();thisMenu.clicked=false;thisMenu.rootMenu=false;thisMenu.clearClicked=false;thisMenu.actualOpenedMenu=false;thisMenu.menuvoice=false;var root=$(this);var openOnClick=this.options.openOnClick;var closeOnMouseOut=this.options.closeOnMouseOut;$(root).each(function(){thisMenu.menuvoice=$(this).find("[menu]");$(thisMenu.menuvoice).each(function(){$(this).addClass("rootVoice");$(this).attr("nowrap","nowrap");});var action=openOnClick?"click":"mouseover";$(thisMenu.menuvoice).bind(action,function(){if(!$(this).attr("isOpen")){$(this).buildMbMenu(thisMenu,$(this).attr("menu"));}
$(this).attr("isOpen","true");if($(this).attr("menu")=="empty"){if(thisMenu.actualOpenedMenu){$(thisMenu.actualOpenedMenu).removeClass("selected");thisMenu.clicked=true;$(this).removeAttr("isOpen");clearTimeout(thisMenu.clearClicked);}
$(this).removeMbMenu(thisMenu);}
return false;});var mouseOver=$.browser.msie?"mouseenter":"mouseover";var mouseOut=$.browser.msie?"mouseleave":"mouseout";$(thisMenu.menuvoice).bind(mouseOver,function(){if(closeOnMouseOut)clearTimeout($.mbMenu.deleteOnMouseOut);if(!openOnClick)$(thisMenu).find(".selected").removeClass("selected");if(thisMenu.actualOpenedMenu){$(thisMenu.actualOpenedMenu).removeClass("selected");}
$(this).addClass("selected");if(thisMenu.clicked&&!$(this).attr("isOpen")){clearTimeout(thisMenu.clearClicked);$(this).buildMbMenu(thisMenu,$(this).attr("menu"));}})
$(thisMenu.menuvoice).bind(mouseOut,function(){if(!thisMenu.clicked)
$(this).removeClass("selected");$(document).bind("click",function(){$(this).removeMbMenu(thisMenu);})})})})},buildContextualMenu:function(options){return this.each(function()
{var thisMenu=this;thisMenu.options={};$.extend(thisMenu.options,$.mbMenu.options);$.extend(thisMenu.options,options);$(".menu").hide();thisMenu.clicked=false;thisMenu.rootMenu=false;thisMenu.clearClicked=false;thisMenu.actualOpenedMenu=false;thisMenu.menuvoice=false;var cMenuEls=$("[cMenu]");$(cMenuEls).each(function(){$(this).css("-khtml-user-select","none");var cm=this;cm.id=!cm.id?"menu_"+Math.floor(Math.random()*100):cm.id;$(cm).css({cursor:"default"});$(cm).bind("contextmenu",function(event){$(this).blur();event.preventDefault();event.stopPropagation();event.cancelBubble=true;$.mbMenu.lastContextMenuEl=cm;thisMenu.options.onContextualMenu(this,event);if($.mbMenu.options.actualMenuOpener){$(thisMenu).removeMbMenu($.mbMenu.options.actualMenuOpener);}
$(this).buildMbMenu(thisMenu,$(this).attr("cMenu"),"cm",event);$(this).attr("isOpen","true");})})})}}
$.fn.extend({buildMbMenu:function(op,m,type,e){var msie6=$.browser.msie&&$.browser.version=="6.0";var mouseOver=$.browser.msie?"mouseenter":"mouseover";var mouseOut=$.browser.msie?"mouseleave":"mouseout";$().bind("click",function(){$(document).removeMbMenu(op)})
if(e){this.mouseX=$(this).getMouseX(e);this.mouseY=$(this).getMouseY(e);}
if($.mbMenu.options.actualMenuOpener&&$.mbMenu.options.actualMenuOpener!=op)
$(op).removeMbMenu($.mbMenu.options.actualMenuOpener);$.mbMenu.options.actualMenuOpener=op;if(!type||type=="cm"){if(op.rootMenu){$(op.rootMenu).remove();$(op.actualOpenedMenu).removeAttr("isOpen")}
op.clicked=true;op.actualOpenedMenu=this;$(op.actualOpenedMenu).attr("isOpen","true")
$(op.actualOpenedMenu).addClass("selected");}
var opener=this;var where=(!type||type=="cm")?$(document.body):$(this).parent().parent();if($(this).attr("menu")=="empty"){return;}
var menuClass=op.options.menuSelector.replace(".","")
where.append("<div class='menuDiv'><div class='"+menuClass+"' style='display:table'></div></div>");this.menu=where.find(".menuDiv");if(op.options.minZindex!="auto"){$(this.menu).css({zIndex:op.options.minZindex++});}else{$(this.menu).mbBringToFront();}
this.menuContainer=$(this.menu).find(op.options.menuSelector);$(this.menuContainer).bind(mouseOver,function(){$(opener).addClass("selected");})
$(this.menuContainer).css({position:"absolute",opacity:op.options.opacity});if(!$("#"+m).html()){$.ajax({type:"POST",url:op.options.template,cache:false,async:false,data:"menuId="+m+(op.options.additionalData!=""?"&"+op.options.additionalData:""),success:function(html){$("body").after(html);$("#"+m).hide();}});}
$(this.menuContainer).hide();this.voices=$("#"+m).find("a").clone();if(op.options.shadow){var shadow=$("<div class='menuShadow'></div>").hide();if(msie6)
shadow=$("<iframe class='menuShadow'></iframe>").hide();}
$(this.voices).each(function(i){var voice=this;var imgPlace="";var isText=$(voice).attr("rel")=="text";var isTitle=$(voice).attr("rel")=="title";var isDisabled=$(voice).is("[disabled]");var isSeparator=$(voice).attr("rel")=="separator";if(op.options.hasImages&&!isText){}
var line="<table id='"+m+"_"+i+"' class='line"+(isTitle?" title":"")+"' cellspacing='0' cellpadding='0' border='0' style='width:100%; display:table' width='100%'><tr>"+imgPlace+"<td class='voice' nowrap></td></tr></table>";if(isSeparator)
line="<div class='separator' style='width:100%; display:inline-block'><img src='"+op.options.iconPath+"blank.gif' width='1' height='1'></div>"
if(isText)
line="<div style='width:100%; display:table' class='line' id='"+m+"_"+i+"'><div class='voice'></div></div>";$(opener.menuContainer).append(line);if(!isSeparator){$(opener.menuContainer).find("#"+m+"_"+i).find(".voice").append(this);if($(this).attr("menu")){$(opener.menuContainer).find("#"+m+"_"+i).find(".voice a").wrap("<div class='menuArrow'></div>");$(opener.menuContainer).find("#"+m+"_"+i).find(".menuArrow").addClass("subMenuOpener");$(opener.menuContainer).find("#"+m+"_"+i).css({cursor:"default"})
this.isOpener=true;}
if(isText){$(opener.menuContainer).find("#"+m+"_"+i).find(".voice").addClass("textBox");this.isOpener=true;}
if(isDisabled){$(opener.menuContainer).find("#"+m+"_"+i)
.addClass("disabled")
.css({cursor:"default"})}
if(!(isText||isTitle||isDisabled)){$(opener.menuContainer)
.find("#"+m+"_"+i)
.css({cursor:"pointer"})
.bind("mouseover",function(event){clearTimeout($.mbMenu.deleteOnMouseOut);$(this).addClass("selected");if(opener.menuContainer.actualSubmenu&&!$(voice).attr("menu")){$(opener.menu).find(".menuDiv").remove();$(opener.menuContainer.actualSubmenu).removeClass("selected");opener.menuContainer.actualSubmenu=false;}
if($(voice).attr("menu")){if(opener.menuContainer.actualSubmenu&&opener.menuContainer.actualSubmenu!=this){$(opener.menu).find(".menuDiv").remove();$(opener.menuContainer.actualSubmenu).removeClass("selected");opener.menuContainer.actualSubmenu=false;}
if(!$(voice).attr("action"))$(opener.menuContainer).find("#"+m+"_"+i).css("cursor","default")
if(!opener.menuContainer.actualSubmenu||opener.menuContainer.actualSubmenu!=this){$(opener.menu).find(".menuDiv").remove();opener.menuContainer.actualSubmenu=false;$(this).buildMbMenu(op,$(voice).attr("menu"),"sm",event);opener.menuContainer.actualSubmenu=this;}
$(this).attr("isOpen","true")
return false;}})
$(opener.menuContainer).find("#"+m+"_"+i).bind(mouseOut,function(){$(this).removeClass("selected");})}
if(isDisabled||isTitle){$(this).removeAttr("href");$(opener.menuContainer).find("#"+m+"_"+i).bind(mouseOver,function(){$(document).unbind("click");if(opener.menuContainer.actualSubmenu){$(opener.menu).find(".menuDiv").remove();opener.menuContainer.actualSubmenu=false;}}).css("cursor","default")}
$(opener.menuContainer).find("#"+m+"_"+i).bind("click",function(){if(($(voice).attr("action")||$(voice).attr("href"))&&!isDisabled){var target=$(voice).attr("target")?$(voice).attr("target"):"_self";if($(voice).attr("href")&&$(voice).attr("href").indexOf("javascript:")>-1){$(voice).attr("action",$(voice).attr("href").replace("javascript:",""));$(voice).removeAttr("href");}
var link=$(voice).attr("action")?$(voice).attr("action"):"window.open('"+$(voice).attr("href")+"', '"+target+"')";$(voice).removeAttr("href");eval(link);$(this).removeMbMenu(op);}else if($(voice).attr("menu"))
return false;})}})
var closeOnMouseOut=$(op)[0].options.closeOnMouseOut;if(closeOnMouseOut){$(opener.menuContainer).bind("mouseenter",function(){clearTimeout($.mbMenu.deleteOnMouseOut);})
$(opener.menuContainer).bind("mouseleave",function(){var menuToRemove=$.mbMenu.options.actualMenuOpener;$.mbMenu.deleteOnMouseOut=setTimeout(function(){$(this).removeMbMenu(menuToRemove)},$(op)[0].options.closeAfter);})}
var t=0,l=0
$(this.menuContainer).css({width:op.options.menuWidth})
if($.browser.msie)$(this.menuContainer).css("width",$(this.menuContainer).width()+2);switch(type){case"sm":t=$(this).position().top+op.options.submenuTop;l=$(this).position().left+$(this).width()-op.options.submenuLeft;break;case"cm":t=this.mouseY-5;l=this.mouseX-5;break;default:if(op.options.openOnRight){t=$(this).offset().top;l=$(this).offset().left+$(this).outerWidth();}else{t=$(this).offset().top+$(this).outerHeight()-(!$.browser.mozilla?2:0)+op.options.menuTop;l=$(this).offset().left+op.options.menuLeft;console.log('2'+t+'=='+l);}
break;}
$(this.menu).css({position:"absolute",top:t,left:l})
if(!type||type=="cm")op.rootMenu=this.menu;$(this.menuContainer).bind(mouseOut,function(){$(document).bind("click",function(){$(document).removeMbMenu(op)})})
if(op.options.fadeInTime>0)$(this.menuContainer).fadeIn(op.options.fadeInTime);else $(this.menuContainer).show();if(op.options.shadow){$(this.menu).prepend(shadow)
shadow.css({width:$(this.menuContainer).outerWidth(),height:$(this.menuContainer).outerHeight()-1,position:'absolute',backgroundColor:op.options.shadowColor,border:0,opacity:op.options.shadowOpacity}).show();}
var wh=$(window).height();var ww=$(window).width();var mh=$(this.menuContainer).outerHeight();var mw=shadow?shadow.outerWidth():$(this.menuContainer).outerWidth();var actualX=$(where.find(".menuDiv:first")).offset().left;var actualY=$(where.find(".menuDiv:first")).offset().top;switch(type){case"sm":if((actualX+mw)>=ww){l-=((op.options.menuWidth*2)-(op.options.submenuLeft*2))}
break;case"cm":if((actualX+(op.options.menuWidth*1.5))>=ww){l-=((op.options.menuWidth*2)-(op.options.submenuLeft))}
break;default:if((actualX+mw)>=ww){l-=($(this.menuContainer).offset().left+mw)-ww;}
break;}
$(this.menu).css({top:t,left:l})},removeMbMenu:function(op){if(!op)op=$.mbMenu.options.actualMenuOpener;if(op.rootMenu){$(op.actualOpenedMenu)
.removeAttr("isOpen")
.removeClass("selected")
$(op.rootMenu).fadeOut($.mbMenu.options.fadeOuTime,function(){$(this).remove()});op.rootMenu=false;op.clicked=false
$(document).unbind("click");}},getMouseX:function(e){var mouseX;if($.browser.msie)mouseX=event.clientX+document.body.scrollLeft;else mouseX=e.pageX;if(mouseX<0)mouseX=0;return mouseX;},getMouseY:function(e){var mouseY;if($.browser.msie)mouseY=event.clientY+document.body.scrollTop;else mouseY=e.pageY;if(mouseY<0)mouseY=0;return mouseY;},mbBringToFront:function(){var zi=10;$('*').each(function(){if($(this).css("position")=="absolute"){var cur=parseInt($(this).css('zIndex'));zi=cur>zi?parseInt($(this).css('zIndex')):zi;}});$(this).css('zIndex',zi+=10);}})
$.fn.buildMenu=$.mbMenu.buildMenu;$.fn.buildContextualMenu=$.mbMenu.buildContextualMenu;})(jQuery);function getBrowserDateTime()
{var now=new Date();var hour=now.getHours();var minute=now.getMinutes();var second=now.getSeconds();var monthnumber=now.getMonth()+1;var monthday=now.getDate();var year=now.getFullYear();var timeZoneOffset=now.getTimezoneOffset()*(-1);if(timeZoneOffset>=0)
var timeZoneSign="+";else
var timeZoneSign="-";var timeZoneHour=Math.floor(Math.abs(timeZoneOffset/60));var timeZoneMin=Math.abs(timeZoneOffset%60);var browserTimeZone=timeZoneSign+timeZoneHour+":"+timeZoneMin;var browserDateTime=year+"/"+monthnumber+"/"+monthday+" "+hour+":"+minute+":"+second;var browserFinalDateTime=browserTimeZone+"==--=="+browserDateTime;return browserFinalDateTime;}
function convertToBrowserDateTime()
{}
function blogPostDetail(formName,blogId,readmore)
{document.getElementById("blogId").value=blogId;document.getElementById("readmore").value=readmore;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogMyPost(formName,blogUserId)
{if(document.getElementById("ChoosePost").value!=0)
{document.getElementById("blogMyIdHidden").value='mypost';}
document.getElementById("blogUserId").value=blogUserId;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogAddComment(formName,blogId,readmore,AddCommentButton)
{document.getElementById("blogId").value=blogId;document.getElementById("readmore").value=readmore;document.getElementById("AddCommentButton").value=AddCommentButton;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogReadMore(formName,blogId)
{document.getElementById("blogId").value=blogId;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogAddComment(formName,addComment,blogId)
{document.getElementById("blogId").value=blogId;document.getElementById("addCommentId").value=addComment;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogCreateNewPost(formName,blogCreateNewPost)
{document.getElementById("blogCreateNewPost").value=blogCreateNewPost;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogPostSubmit(formName,blogCreatePost)
{if(trim(document.getElementById("blogPostTitle").value)=='')
{msg="please enter Blog Title";displayMessage("BlogTitleErrorId",msg,0);return false;}
if(trim(document.getElementById("blogPostSummary").value)=='')
{msg="please enter Blog Summary";displayMessage("BlogTitleErrorId",msg,0);return false;}
if(trim(document.getElementById("blogPostComments").value)=='')
{msg="please enter Blog Comments";displayMessage("BlogTitleErrorId",msg,0);return false;}
if(trim(document.getElementById("blogPostComments").value)=='')
{msg="please enter Blog Comments";displayMessage("BlogTitleErrorId",msg,0);return false;}
document.getElementById("blogCreatePost").value=blogCreatePost;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogSearch(formName,blogSearch)
{document.getElementById("blogSearch").value=blogSearch;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();return false;}
function blogView(formName,blogHidden)
{document.getElementById("blogListOpenHidden").value='blogOpen';document.getElementById("blogHidden").value=blogHidden;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/";document.getElementById(formName).submit();}
function blogEditDelete(formName,mode,blogId)
{document.getElementById("editBlogId").value=blogId;document.getElementById(formName).action=HOST_ROOT_PATH_VAR+"Blog/"+mode+'/';document.getElementById(formName).submit();}
jQuery.fn.clockpick=function(x,s){var c={starthour:8,endhour:18,showminutes:true,minutedivisions:4,military:false,event:'click',layout:'vertical',valuefield:null,useBgiframe:false,hoursopacity:1,minutesopacity:1};if(x){jQuery.extend(c,x)};var s=s||function(){},g=(c.layout=='vertical');D();jQuery(this)[c.event](function(u){var E=this,k=jQuery(this),o=jQuery("body");if(!c.valuefield){k.unbind("keydown").bind("keydown",p)}else{jQuery("[name="+c.valuefield+"]").unbind("keydown").bind("keydown",p)[0].focus()}jQuery("#CP_hourcont,#CP_minutecont").remove();$hourcont=jQuery("<div id='CP_hourcont' class='CP' />").appendTo(o);!c.useBgiframe?$hourcont.css("opacity",c.hoursopacity):null;q($hourcont);$hourcol1=jQuery("<div class='CP_hourcol' id='hourcol1' />").appendTo(o);$hourcol2=jQuery("<div class='CP_hourcol' id='hourcol2' />").appendTo(o);if(c.showminutes){$mc=jQuery("<div id='CP_minutecont' class='CP' />").appendTo(o);!c.useBgiframe?$mc.css("opacity",c.minutesopacity):null;q($mc)}if(!g){$hourcont.css("width","auto");$mc.css("width","auto")}else{$hourcol1.addClass('floatleft');$hourcol2.addClass('floatleft')}F();G();function F(){var a=1;for(h=c.starthour;h<=c.endhour;h++){if(h==12){a=1}displayhours=((!c.military&&h>12)?h-12:h)+r(h);if(!c.military&&h==0){displayhours='12'+r(h)}$hd=jQuery("<div class='CP_hour' id='hr_"+h+"_"+a+"'>"+displayhours+"</div>");if(c.military){$hd.width(20)}q($hd);if(!g){$hd.css("float","left")}(h<12)?$hourcol1.append($hd):$hourcol2.append($hd);a++}$hourcont.append($hourcol1);!g?$hourcont.append("<div style='clear:left' />"):'';$hourcont.append($hourcol2)}function H(a){realhours=a;displayhours=(!c.military&&a>12)?a-12:a;if(!c.military&&a==0){displayhours='12'}$mc.empty();var b=60/c.minutedivisions,i=r(realhours),f=1;for(m=0;m<60;m=m+b){$md=jQuery("<div class='CP_minute' id='"+realhours+"_"+m+"'>"+displayhours+":"+((m<10)?"0":"")+m+i+"</div>");if(!g){$md.css("float","left");if(c.minutedivisions>6&&f==c.minutedivisions/2+1){$mc.append("<div style='clear:left' />")}}$mc.append($md);q($md);f++}}function r(a){if(!c.military){return(a>=12)?' PM':' AM'}else{return''}}function G(){if(u.type!='focus'){$hourcont.css("left",u.pageX-5+'px').css("top",u.pageY-(Math.floor($hourcont.height()/2))+'px');y($hourcont)}else{k.after($hourcont)}$hourcont.slideDown('fast');if(c.useBgiframe)z($hourcont)}function y(a){var b=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var i=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;var f=parseInt(a.css("top"));var d=parseInt(a.css("left"));var e=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(f<=e&&!a.is("#CP_minutecont")){a.css("top",e+10+'px')}else if(f+a.height()-e>b){a.css("top",e+b-a.height()-10+'px')}if(d<=0){a.css("left",'10px')}}function z(a){if(typeof jQuery.fn.bgIframe=='function')a.bgIframe();else alert('bgIframe plugin not loaded.')}function q(b){if(b.attr("id")=='CP_hourcont'){b.mouseout(function(a){I(a)})}else if(b.attr("id")=='CP_minutecont'){b.mouseout(function(a){J(a)})}else if(b.attr("class")=='CP_hour'){b.mouseover(function(a){v(b,a)});b.mouseout(function(){w(b)});b.click(function(){K(b)})}else if(b.attr("class")=='CP_minute'){b.mouseover(function(){A(b)});b.mouseout(function(){B(b)});b.click(function(){L(b)})}};function I(a){try{t=(a.toElement)?a.toElement:a.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){j()}}catch(a){j()}}function J(a){try{t=(a.toElement)?a.toElement:a.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){j()}}catch(a){j()}}function v(a,b){var i=a.attr("id").split('_')[1],f=a.attr("id").split('_')[2],d,e;a.addClass("CP_over");if(c.showminutes){$mc.hide();H(i);if(g){e=b.type=='mouseover'?b.pageY-15:$hourcont.offset().top+2+(a.height()*f);if(i<12)d=$hourcont.offset().left-$mc.width()-2;else d=$hourcont.offset().left+$hourcont.width()+2}else{d=(b.type=='mouseover')?b.pageX-10:$hourcont.offset().left+(a.width()-5)*f;if(i<12){e=$hourcont.offset().top-$mc.height()-2}else{e=$hourcont.offset().top+$hourcont.height()}}$mc.css("left",d+'px').css("top",e+'px');y($mc);$mc.show();if(c.useBgiframe)z($mc)}return false}function w(a){a.removeClass("CP_over");return false}function K(a){h=a.attr("id").split('_')[1];tt=r(h);str=a.text();if(str.indexOf(' ')!=-1){cleanstr=str.substring(0,str.indexOf(' '))}else{cleanstr=str}a.text(cleanstr+':00'+tt);C(a);j()}function A(a){a.addClass("CP_over");return false}function B(a){a.removeClass("CP_over");return false}function L(a){C(a);j()}function C(a){if(!c.valuefield){E.value=a.text()}else{jQuery("input[name="+c.valuefield+"]").val(a.text())}s.apply(k,[a.text()]);k.unbind("keydown",p)}function j(){if(c.showminutes){$mc.hide()}$hourcont.slideUp('fast');k.unbind("keydown",p)}function p(f){var d=$("div.CP_over").size()?$("div.CP_over"):$("div.CP_hour:first"),e=d.is(".CP_hour")?'hour':'minute',M=(e=='hour')?d[0].id.split('_')[2]:0,l=(e=='minute')?d[0].id.split('_')[0]:d[0].id.split('_')[1];if(e=='minute'){var n=l<12?'m1':'m2'}else{var n=l<12?'h1':'h2'}function divprev(a){if(a.prev().size()){eval(e+'div_out($obj)');eval(e+'div_over($obj.prev(), e)')}else{return false}}function divnext(a){if(a.next().size()){eval(e+'div_out($obj)');eval(e+'div_over($obj.next(), e)')}else{return false}}function hourtohour(a){var b=l>=12?'#hourcol1':'#hourcol2';$newobj=jQuery(".CP_hour[id$=_"+M+"]",b);if($newobj.size()){w(a);v($newobj,f)}else{return false}}function hourtominute(a){w(a);A($(".CP_minute:first"))}function minutetohour(a){B(a);var b=l>=12?'#hourcol2':'#hourcol1';var i=jQuery(".CP_hour[@id^=hr_"+l+"]",b);v(i,f)}switch(f.keyCode){case 37:if(g){switch(n){case'm1':return false;break;case'm2':minutetohour(d);break;case'h1':hourtominute(d);break;case'h2':hourtohour(d);break}}else{divprev(d)}break;case 38:if(g){divprev(d)}else{switch(n){case'm1':return false;break;case'm2':minutetohour(d);break;case'h1':hourtominute(d);break;case'h2':hourtohour(d);break}}break;case 39:if(g){switch(n){case'm1':minutetohour(d);break;case'm2':return false;break;case'h1':hourtohour(d);break;case'h2':hourtominute(d);break}}else{divnext(d)}break;case 40:if(g){divnext(d)}else{switch(n){case'm1':minutetohour(d);break;case'm2':return false;break;case'h1':hourtohour(d);break;case'h2':hourtominute(d);break}}break;case 13:eval(e+'div_click($obj)');break}return false}return false});function D(){if(c.starthour>=c.endhour){alert('Error - start hour must be less than end hour.');return false}else if(60%c.minutedivisions!=0){alert('Error - param minutedivisions must divide evenly into 60.');return false}}return this}
var tb_pathToImage="images/loadingAnimation.gif";var projDiv="";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;var ankerId=this.id||"";projDiv=ankerId;tb_show(t,a,g,ankerId);this.blur();return false;});}
function tb_show(caption,url,imageGroup,ankerId){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'  ></div>");$("#TB_overlay").click(tb_remove);}}
if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[@rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]+200;var y=pagesize[1]+200;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;p="<a href='' id='TB_ImageOff' title='Click To Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>";if($("#proj"+ankerId).html())p=p+$("#proj"+ankerId).html();else
p=p+"&nbsp;&nbsp;";$("#TB_window").append(p);$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
$("#TB_prev").click(goPrev);}
if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
$("#TB_next").click(goNext);}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' style='text-decoration:none;' ><img src='"+HOST_ROOT_PATH_VAR+"/facebox/close_over.gif' border='0'/ ></a> </div><div id='TB_ajaxContent'title='Click To Close' class='TB_ajaxContentClose' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;text-align:center;'></div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' style='text-decoration:none;' ><img style='visibility:hidden;' src='"+HOST_ROOT_PATH_VAR+"/facebox/close_over.gif' border='0'/ ></a> </div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}
$("#TB_closeWindowButton").click(tb_remove);$(".TB_ajaxContentClose").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}};}}catch(e){}}
function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});}
function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}
function tb_parseQuery(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}
function removeHelpText(textValue,secondFunction){currentInputId='#'+textValue;helpText=$(currentInputId).attr('title')
v=$(currentInputId).val();if(v==helpText){$(currentInputId).attr('value','');}}
function validateField(errorMsg,spanId,secondFunction){var errorArray=errorMsg.split("#");len=errorArray.length;for(i=0;i<len;i++){var errorMsgArray=errorArray[i].split("~");currentId="#"+spanId;data=$(currentId).val();data=jQuery.trim(data);$(currentId).attr('value',data);if(jQuery.trim(errorMsgArray[0])=='isBlank')
message=isBlank(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isUserName')
message=isUserName(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isCharacter')
message=isCharacter(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isSpecialCharacter')
message=isSpecialCharacter(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isFirstCharBlank')
message=isFirstCharBlank(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isNumeric')
message=isNumeric(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isEmail')
message=isEmail(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isDecimal')
message=isDecimal(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isDate')
message=isDate(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isPhonrNumber')
message=isPhonrNumber(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='IsDecimal1')
message=IsDecimal1(spanId,errorMsgArray[1]);if(jQuery.trim(errorMsgArray[0])=='isEmail')
message=isEmail(spanId,errorMsgArray[1]);if(message!="")
{errorSpan="#error"+spanId;formErrorInput='#formPost'+spanId
$(formErrorInput).attr('value','2');$(errorSpan).html(errorMsgArray[1]);return false;}}
if(toString(secondFunction.length>3)){eval(secondFunction);}
return true;}
function removeError(spanId){errorSpan="#error"+spanId;formErrorInput='#formPost'+spanId
$(formErrorInput).attr('value','1');$(errorSpan).html('');}
function validateCustomError(spanId,msg,status){var str=status;str=str.toUpperCase();if(str=='FAIL'){errorSpan="#error"+spanId;formErrorInput='#formPost'+spanId
$(formErrorInput).attr('value','2');$(errorSpan).html(msg);}else{errorSpan="#error"+spanId;formErrorInput='#formPost'+spanId
$(formErrorInput).attr('value','1');$(errorSpan).html('');}}
function checkHelpText(textValue,secondFunction){currentInputId='#'+textValue;helpText=$(currentInputId).attr('title')
v=$(currentInputId).val();if(v.length==0){$(currentInputId).attr('value',helpText)}
if(toString(secondFunction)!=1){eval(secondFunction);}}
function validateForm(){var flag=1;var hi=$('input:hidden');hi.each(function(i,el){hiddenType=$(el).attr('id');nameOfHidden=hiddenType.substring(0,8);if(nameOfHidden=='formPost'){hiddenValue=$(el).val();nameOfInput=hiddenType.substring(8);if(hiddenValue==2){errorSpan="#error"+nameOfInput;formErrorInput='#formPost'+nameOfInput
$(formErrorInput).attr('value','2');$(errorSpan).html('Enter Correct Value');inputId="#"+nameOfInput;$(inputId).focus()
flag=0;;return false;}else{inputId="#"+nameOfInput;eventCalled=$(inputId).attr('eventcalled');if(eventCalled){recheckValidation=validateField(eventCalled,nameOfInput,1);if(recheckValidation==true){flag=1;}else{flag=0;return false;}}}}
if(flag==1)
return true;else
return false;});if(flag==1)
return true;else
return false;}
(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
if(typeof options=='function')
options={success:options};options=$.extend({url:this.attr('action')||window.location.toString(),type:this.attr('method')||'GET'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data)
a.push({name:n,value:options.data[n]});}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else
options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}
else if(options.success)
callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)
callbacks[i](data,status,$form);};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)
if(files[j])
found=true;if(options.iframe||found){if($.browser.safari&&options.closeKeepAlive)
$.get(options.closeKeepAlive,fileUpload);else
fileUpload();}
else
$.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[@name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return;}
var opts=$.extend({},$.ajaxSettings,options);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" />');var io=$io[0];if($.browser.msie||$.browser.opera)
io.src='javascript:false;document.write("");';$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y;}}}
setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');$form.attr({target:id,encoding:'multipart/form-data',enctype:'multipart/form-data',method:'POST',action:opts.url});if(opts.timeout)
setTimeout(function(){timedOut=true;cb();},opts.timeout);var extraInputs=[];try{if(options.extraData)
for(var n in options.extraData)
extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
.appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit();}
finally{$form.attr('action',a);t?$form.attr('target',t):$form.removeAttr('target');$(extraInputs).remove();}},10);function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var operaHack=0;var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(doc.body==null&&!operaHack&&$.browser.opera){operaHack=1;cbInvoked--;setTimeout(cb,100);return;}
xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header];};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];xhr.responseText=ta?ta.value:xhr.responseText;}
else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
data=$.httpData(xhr,opts.dataType);}
catch(e){ok=false;$.handleError(opts,xhr,'error',e);}
if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}
if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else
doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false;}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var $form=this.form;$form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){$form.clk_x=e.offsetX;$form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();$form.clk_x=e.pageX-offset.left;$form.clk_y=e.pageY-offset.top;}else{$form.clk_x=e.pageX-this.offsetLeft;$form.clk_y=e.pageY-this.offsetTop;}}
setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null;},10);});});};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin');});};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});continue;}
var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:n,value:v});}
if(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)
a.push({name:n,value:v[i]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:this.name,value:v});});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))
continue;v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))
return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes['value'].specified)?op.text:op.value;if(one)return v;a.push(v);}}
return a;}
return el.value;};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')
this.value='';else if(t=='checkbox'||t=='radio')
this.checked=false;else if(tag=='select')
this.selectedIndex=-1;});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))
this.reset();});};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b});};$.fn.select=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')
this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').select(false);}
this.selected=select;}});};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)
window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''));};})(jQuery);