if(typeof(ow)=="undefined"){var ow={}}ow.conf={};ow.conf.VERSION="0.4.5.1";ow.conf.debugEnabled=false;ow.core={};ow.core.arrayFind=function(array,string){var index=-1;for(var i=0;i<array.length;i++){if(array[i]==string){index=i;break}}return index};ow.core.camelize=function(str){var oStringList=str.split("-");if(oStringList.length==1){return oStringList[0]}var camelizedString=str.indexOf("-")==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1)}return camelizedString};ow.core.getAttribute=function(el,attr,defaultValue){if(el.getAttribute(attr,2)){return el.getAttribute(attr)}else{return defaultValue!==undefined?defaultValue:null}};ow.core.listAppend=function(list,value,delimiter){if(!delimiter){delimiter=","}if(ow.core.trim(list)===""){return""+value}else{return""+list+delimiter+value}};ow.core.stripTags=function(str){return str.toString().replace(/(<([^>]+)>)/ig,"")};ow.core.trim=function(str){return str.toString().replace(/\s+$|^\s+/g,"")};ow.core.uCase=function(str){return String(str).toUpperCase()};ow.core.getWords=function(str,words,ellipsis){var theString=ow.core.trim(str);theString=theString.replace(/ ,/g,",").replace(/  /g," ");var arString=theString.split(" ");var len=arString.length;if(len>words){theString="";for(var i=0;i<len;i++){if(ow.core.trim(arString[i])){theString+=arString[i];if(theString.split(" ").length>words){if(ellipsis){theString+="..."}break}else{theString+=" "}}}}return theString};ow.core.getUrlParam=function(paramName,parentLocation){var res="";var queryString="";if(parentLocation){queryString=self.parent.location.search}else{queryString=document.location.search}queryString=decodeURI(queryString);if(queryString.length>=0){if(queryString.charAt(0)=="?"){queryString=queryString.substring(1)}var sep=(queryString.indexOf("&amp;")>=0)?"&amp;":"&";queryString=queryString.split(sep);for(var i=0;i<queryString.length;i++){var tmpArray=queryString[i].split("=");if(tmpArray[0]==paramName){res=tmpArray[1];break}}}return res};ow.core.overlay=function(content,outerStyle,innerStyle,reset){var styleToApply=[];styleToApply[0]="visibility:visible;position:absolute;left:0px;top:0px;width:100%;height:100%;text-align:center;background-image:url(overlay.gif);z-index:1001;";styleToApply[1]="width:300px;margin:100px auto;background-color:#fff;border:1px solid #000;padding:15px;text-align:center;";if(!outerStyle){outerStyle=""}if(!innerStyle){innerStyle=""}if(reset==true){styleToApply[0]=outerStyle;styleToApply[1]=innerStyle}else{styleToApply[0]+=outerStyle;styleToApply[1]+=innerStyle}var divs=[];divs[0]=document.createElement("div");divs[1]=document.createElement("div");divs[1].innerHTML=content;var tmp,propVal;for(var i=0;i<styleToApply.length;i++){propVal=styleToApply[i].split(";");for(var j=0;j<propVal.length;j++){tmp=propVal[j].split(":");if(tmp.length!=2){break}else{divs[i].style[ow.core.camelize(ow.core.trim(tmp[0]))]=tmp[1]}}}var theBody=document.getElementsByTagName("body").item(0);theBody.style.height="100%";theBody.style.margin=0;theBody.style.padding=0;divs[0].appendChild(divs[1]);return theBody.appendChild(divs[0])};ow.core.openWin=function(url,winName,winWidth,winHeight,winFeatures){if(!url){url=""}if(!winName){winName="NewWindow"}if(!winWidth){winWidth=450}if(!winHeight){winHeight=320}if(!winFeatures){winFeatures="resizable=1"}else{var params=winFeatures.split(",");for(var i=0;i<params.length;i++){params[i]=ow.core.trim(params[i])}var centerscreen=ow.core.arrayFind(params,"centerscreen");if(centerscreen>-1){var winWidthFudge=winWidth+32;var winHeightFudge=winHeight+96;var wLeft=(screen.width-winWidthFudge)/2;var wTop=(screen.height-winHeightFudge)/2;var strLeft="left="+wLeft;var strTop="top="+wTop;params.push(strTop);params.push(strLeft);winFeatures=params.join(",")}}var gui="width="+winWidth+",height="+winHeight+","+winFeatures;var win=window.open(url,winName,gui);win.focus();return win};ow.core.EPOCH=new Date("1 January 1970 00:00:00");ow.core.toDate=function(str){var theDate;if(typeof(str)=="date"){theDate=str}else{theDate=new Date(Date.parse(str));if(theDate=="Invalid Date"){theDate=ow.core.EPOCH}}return theDate};ow.core.getElementValue=function(domDoc,tagName){return ow.xml.getElementValue(domDoc,tagName)};ow.core.addTableRow=function(tableID,cellsContent){var table=document.getElementById(tableID);var row=table.insertRow(table.rows.length);var cell="";for(var i=0;i<cellsContent.length;i++){cell=row.insertCell(row.cells.length);cell.innerHTML=cellsContent[i]}};ow.core.getElementsByTagNames=function(list,obj){if(!obj){var obj=document}var tagNames=list.split(",");var resultArray=new Array();for(var i=0;i<tagNames.length;i++){var tags=obj.getElementsByTagName(tagNames[i]);for(var j=0;j<tags.length;j++){resultArray.push(tags[j])}}var testNode=resultArray[0];if(!testNode){return[]}if(testNode.sourceIndex){resultArray.sort(function(a,b){return a.sourceIndex-b.sourceIndex})}else{if(testNode.compareDocumentPosition){resultArray.sort(function(a,b){return 3-(a.compareDocumentPosition(b)&6)})}}return resultArray};ow.core.toNumber=function(str){var num;if(!str||str==""){num=0}else{if(typeof(str)=="number"){num=str}else{num=parseFloat((str.replace(/[^0-9\.,]/g,"").replace(",",".")))}}if(isNaN(num)){num=0}return num};ow.core.compare=function(a,b,asc,type){if(typeof(asc)=="undefined"){asc=true}if(typeof(type)=="undefined"){type="string"}var cast=ow.core.uCase;switch(type){case"number":cast=ow.core.toNumber;break;case"date":cast=ow.core.toDate;break}if(cast(a)<cast(b)){return asc?-1:1}else{if(cast(a)>cast(b)){return asc?1:-1}else{return 0}}};ow.core.isMoz=function(){var isMoz=false;if(navigator.product){if(navigator.product=="Gecko"){isMoz=true}}return isMoz};ow.core.isIE=function(){var isIE=false;if(navigator.appName&&navigator.appName=="Microsoft Internet Explorer"){isIE=true}return isIE};ow.core.addWindowOnLoad=function(f){var _onload=window.onload;if(typeof window.onload!="function"){window.onload=f}else{window.onload=function(){_onload();f()}}};ow.core.toogle=function(elId){var el=document.getElementById(elId);if(el.style.display!="none"){el.style.display="none"}else{el.style.display=""}};ow.core.loadExternalFile=function(path,type){if(!type){type="js"}switch(type){case"js":var fileRef=document.createElement("script");fileRef.setAttribute("type","text/javascript");fileRef.setAttribute("src",path);break;case"css":var fileRef=document.createElement("link");fileRef.setAttribute("rel","stylesheet");fileRef.setAttribute("type","text/css");fileRef.setAttribute("href",filename);break}if(typeof fileRef!="undefined"){document.getElementsByTagName("head")[0].appendChild(fileRef)}};ow.core.getElementsByName_ie=function(tag,name){var elem=document.getElementsByTagName(tag);var arr=new Array();for(i=0,iarr=0;i<elem.length;i++){att=elem[i].getAttribute("name");if(att==name){arr[iarr]=elem[i];iarr++}}return arr};ow.form={};ow.form.setCheckboxValues=function(checkboxName,lstValues){if(ow.core.isIE()){var arrayCheckboxes=ow.core.getElementsByName_ie("input",checkboxName)}else{var arrayCheckboxes=document.getElementsByName(checkboxName)}var n=arrayCheckboxes.length;var arrayValues=[];if(lstValues!=""){arrayValues=lstValues.split(",")}for(var index=0;index<n;index++){if(lstValues!=""&&ow.core.arrayFind(arrayValues,arrayCheckboxes[index].value)!=-1){arrayCheckboxes[index].checked=true}else{arrayCheckboxes[index].checked=false}}};ow.form.getCheckboxValues=function(checkboxName,attributeName){if(ow.core.isIE()){var arrayCheckboxes=ow.core.getElementsByName_ie("input",checkboxName)}else{var arrayCheckboxes=document.getElementsByName(checkboxName)}var n=arrayCheckboxes.length;var lstValues="";if(!attributeName){attributeName="value"}for(var index=0;index<n;index++){if(arrayCheckboxes[index].checked==true&&arrayCheckboxes[index].getAttribute(attributeName)!=""){if(lstValues!=""){lstValues=lstValues+","+arrayCheckboxes[index].getAttribute(attributeName)}else{lstValues=arrayCheckboxes[index].getAttribute(attributeName)}}}return lstValues};ow.form.checkRadioByValue=function(radioName,radioValue){var inputs=document.getElementsByTagName("input");var founded=false;if(inputs){for(var i=0;i<inputs.length;++i){if(inputs[i].type=="radio"&inputs[i].name==radioName){if(inputs[i].value==radioValue){inputs[i].checked=true;founded=true}}}}return founded};ow.form.getSelectValues=function(selectName,attributeName){if(ow.core.isIE()){var arraySelect=ow.core.getElementsByName_ie("select",selectName)}else{var arraySelect=document.getElementsByName(selectName)}var n=arraySelect.length;var lstValues="";if(!attributeName){attributeName="value"}for(var index=0;index<n;index++){var m=arraySelect[index].options.length;for(var optIndex=0;optIndex<m;optIndex++){var thisOption=arraySelect[index].options[optIndex];if(thisOption.selected==true&&thisOption.getAttribute(attributeName)!=""){if(lstValues!=""){lstValues=lstValues+","+thisOption.getAttribute(attributeName)}else{lstValues=thisOption.getAttribute(attributeName)}}}}return lstValues};ow.form.setSelectValues=function(selectName,lstValues){if(ow.core.isIE()){var arraySelects=ow.core.getElementsByName_ie("select",selectName)}else{var arraySelects=document.getElementsByName(selectName)}var n=arraySelects.length;var arrayValues=[];if(lstValues!=""){arrayValues=lstValues.split(",")}for(var index=0;index<n;index++){for(var selectIndex=0;selectIndex<arraySelects[index].options.length;selectIndex++){if(lstValues!=""&&ow.core.arrayFind(arrayValues,arraySelects[index].options[selectIndex].value)!=-1){arraySelects[index].options[selectIndex].selected=true}else{arraySelects[index].options[selectIndex].selected=false}}}};ow.form.isChecked=function(el){for(var i=0;i<el.length;i++){if(el[i].checked){return true}}return false};ow.form.disableSubmit=function(form){var aInputs=form.getElementsByTagName("input");if(aInputs.length){for(var i=0;i<aInputs.length;i++){if(aInputs[i].type=="submit"){aInputs[i].disabled=arguments[1]!==undefined?arguments[1]:true}}}};ow.tag={};ow.tag.showImage=function(){var allTags=document.getElementsByTagName("a");var href="";for(var i=0;i<allTags.length;i++){if(allTags[i].getAttribute("ow:showImage")){href=allTags[i].getAttribute("href");allTags[i].theImage=new Image();allTags[i].theImage.src=href;if(allTags[i].getAttribute("ow:showImage")=="popup"){allTags[i].onclick=openImage}else{if(allTags[i].getAttribute("ow:showImage")=="page"){allTags[i].onclick=viewImage}}}}function openImage(){var params="centerscreen";var winWidth=618;var winHeight=480;var winTitle=this.getAttribute("title");var winName=this.getAttribute("target");if(!winName||winName=="_blank"){winName=""}var theSource=this.theImage.src;var fixDimension=5;if(this.theImage.width>0){winWidth=this.theImage.width-fixDimension;winHeight=this.theImage.height-fixDimension}var strImage='<div align="center"><img src="'+theSource+'" border="0" hspace="0" vspace="0" align="middle"></div>';var strBaseWindow='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><style type="text/css">body{border: 0px;margin: 0px;padding:0px;}</style><title>'+winTitle+'</title></head><body onload="self.focus();" onblur="self.close()">'+strImage+"</body></html>";var win=ow.core.openWin(null,winName,winWidth,winHeight,params);var tmp=win.document;tmp.write(strBaseWindow);tmp.close();win.focus();return false}function viewImage(){var target=this.getAttribute("target");var imageSrc=this.getAttribute("href");var idImg="owImageContainer";var elTarget=document.getElementById(target);if(elTarget){if(document.getElementById(idImg)){document.getElementById(idImg).setAttribute("src",imageSrc)}else{var strImage='<img src="'+imageSrc+'" border="0" id="'+idImg+'">';elTarget.innerHTML=strImage}}return false}};ow.validator={};ow.validator.isEmail=function(str){var re=new RegExp("^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w\\.-]{2,4}$");if(re.test(str)){return true}else{return false}};ow.debug={};ow.debug.dumpProp=function(obj){var str="";var sorted=[];for(var p in obj){sorted.push(p)}sorted.sort();for(var i=0;i<sorted.length;i++){str+=sorted[i]+": "+obj[i]+"\n"}return str};ow.debug.Timer=function(){this.timeStart=new Date();this.getElapsedTime=function(){var timeStop=new Date();var elapsedTime=(timeStop-this.timeStart)/1000;return elapsedTime}};ow.xml={};ow.xml.domParser=function(str){try{var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(str)}catch(e){try{var parser=new DOMParser();var xmlDoc=parser.parseFromString(str,"text/xml")}catch(e){throw (e)}}return xmlDoc};ow.xml.getElementByNodeValue=function(doc,parentElement,childElement,value){var res=[];var el=doc.getElementsByTagName(parentElement);var elChild;for(var i=0;i<el.length;i++){elChild=el[i].getElementsByTagName(childElement);for(var j=0;j<elChild.length;j++){if(elChild[j].firstChild.nodeValue==value){res.push(el[i]);break}}}return res};ow.xml.getElementValue=function(domDoc,tagName){if(!domDoc){return false}var el=domDoc.getElementsByTagName(tagName).item(0);if(el&&el.hasChildNodes()){return el.firstChild.nodeValue}else{return false}};ow.moz={};ow.misc={};ow.console={};ow.console.log=function(obj){if(!ow.conf.debugEnabled){return}console.log(obj)};ow.console.info=function(obj){if(!ow.conf.debugEnabled){return}console.info(obj)};ow.console.warn=function(obj){if(!ow.conf.debugEnabled){return}console.warn(obj)};ow.console.error=function(obj){if(!ow.conf.debugEnabled){return}console.error(obj)};if(!window.console){var console={init:function(){console.d=document.createElement("div");document.body.appendChild(console.d);var a=document.createElement("a");a.href="javascript:console.hide()";a.innerHTML="close";console.d.appendChild(a);var a=document.createElement("a");a.href="javascript:console.clear();";a.innerHTML="clear";console.d.appendChild(a);var id="fauxconsole";if(!document.getElementById(id)){console.d.id=id}console.hide();var txtStyle="#fauxconsole{position:absolute;top:0;right:0;width:300px;border:1px solid #999;font-family:courier,monospace;background:#eee;font-size:10px;padding:10px;}";txtStyle+="html>body #fauxconsole{position:fixed;}";txtStyle+="#fauxconsole a{float:right;padding-left:1em;padding-bottom:.5em;text-align:right;}";var style=document.createTextNode(txtStyle);var cssNode=document.createElement("style");cssNode.setAttribute("type","text/css");if(cssNode.styleSheet){cssNode.styleSheet.cssText=txtStyle}else{cssNode.appendChild(style)}document.getElementsByTagName("head")[0].appendChild(cssNode)},hide:function(){console.d.style.display="none"},show:function(){console.d.style.display="block"},log:function(o){console.d.innerHTML+="<br/>"+o;console.show()},info:function(o){log(o)},warn:function(o){log(o)},error:function(o){log(o)},clear:function(){console.d.parentNode.removeChild(console.d);console.init();console.show()}};ow.core.addWindowOnLoad(console.init)};
