if(typeof (opt)=="undefined"){
var opt={};
}
opt.conf={};
opt.conf.VERSION="0.4.6.0";
opt.conf.debugEnabled=false;
opt.core={};
opt.core.arrayFind=function(_1,_2){
var _3=-1;
for(var i=0;i<_1.length;i++){
if(_1[i]==_2){
_3=i;
break;
}
}
return _3;
};
opt.core.listAppend=function(_5,_6,_7){
if(!_7){
_7=",";
}
if(opt.core.trim(_5)===""){
return ""+_6;
}else{
return ""+_5+_7+_6;
}
};
opt.core.listFind=function(_8,_9,_a,_b){
_8=_8+"";
if(!_b){
_b=",";
}
var r=0;
var _d=_8.split(_b);
var el="";
for(var i=0;i<_d.length;i++){
if(!_a){
el=opt.core.trim(_d[i]);
}else{
el=_d[i];
}
if(el==_9){
r=i+1;
break;
}
}
return r;
};
opt.core.stripTags=function(str){
return str.toString().replace(/(<([^>]+)>)/ig,"");
};
opt.core.trim=function(str){
return str.toString().replace(/\s+$|^\s+/g,"");
};
opt.core.camelize=function(str){
var _13=str.split("-");
if(_13.length==1){
return _13[0];
}
var _14=str.indexOf("-")==0?_13[0].charAt(0).toUpperCase()+_13[0].substring(1):_13[0];
for(var i=1,len=_13.length;i<len;i++){
var s=_13[i];
_14+=s.charAt(0).toUpperCase()+s.substring(1);
}
return _14;
};
opt.core.uCase=function(str){
return String(str).toUpperCase();
};
opt.core.getWords=function(str,_19,_1a){
var _1b=opt.core.trim(str);
_1b=_1b.replace(/ ,/g,",").replace(/  /g," ");
var _1c=_1b.split(" ");
var len=_1c.length;
if(len>_19){
_1b="";
for(var i=0;i<len;i++){
if(opt.core.trim(_1c[i])){
_1b+=_1c[i];
if(_1b.split(" ").length>_19){
if(_1a){
_1b+="...";
}
break;
}else{
_1b+=" ";
}
}
}
}
return _1b;
};
opt.core.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
opt.core.getUrlParam=function(_20,_21){
var res="";
var _23="";
if(_21){
_23=self.parent.location.search;
}else{
_23=document.location.search;
}
_23=decodeURI(_23);
if(_23.length>=0){
if(_23.charAt(0)=="?"){
_23=_23.substring(1);
}
var sep=(_23.indexOf("&amp;")>=0)?"&amp;":"&";
_23=_23.split(sep);
for(var i=0;i<_23.length;i++){
var _26=_23[i].split("=");
if(_26[0]==_20){
res=_26[1];
break;
}
}
}
return res;
};
opt.core.overlay=function(_27,_28,_29,_2a){
var _2b=[];
_2b[0]="visibility:visible;position:absolute;left:0px;top:0px;width:100%;height:100%;"+"text-align:center;background-image:url(overlay.gif);z-index:1001;";
_2b[1]="width:300px;margin:100px auto;background-color:#fff;border:1px solid #000;"+"padding:15px;text-align:center;";
if(!_28){
_28="";
}
if(!_29){
_29="";
}
if(_2a==true){
_2b[0]=_28;
_2b[1]=_29;
}else{
_2b[0]+=_28;
_2b[1]+=_29;
}
var _2c=[];
_2c[0]=document.createElement("div");
_2c[1]=document.createElement("div");
_2c[1].innerHTML=_27;
var tmp,propVal;
for(var i=0;i<_2b.length;i++){
propVal=_2b[i].split(";");
for(var j=0;j<propVal.length;j++){
tmp=propVal[j].split(":");
if(tmp.length!=2){
break;
}else{
_2c[i].style[opt.core.camelize(opt.core.trim(tmp[0]))]=tmp[1];
}
}
}
var _30=document.getElementsByTagName("body").item(0);
_30.style.height="100%";
_30.style.margin=0;
_30.style.padding=0;
_2c[0].appendChild(_2c[1]);
return _30.appendChild(_2c[0]);
};
opt.core.openWin=function(url,_32,_33,_34,_35){
if(!url){
url="";
}
if(!_32){
_32="NewWindow";
}
if(!_33){
_33=450;
}
if(!_34){
_34=320;
}
if(!_35){
_35="resizable=1";
}else{
var _36=_35.split(",");
for(var i=0;i<_36.length;i++){
_36[i]=opt.core.trim(_36[i]);
}
var _38=opt.core.arrayFind(_36,"centerscreen");
if(_38>-1){
var _39=_33+32;
var _3a=_34+96;
var _3b=(screen.width-_39)/2;
var _3c=(screen.height-_3a)/2;
var _3d="left="+_3b;
var _3e="top="+_3c;
_36.push(_3e);
_36.push(_3d);
_35=_36.join(",");
}
}
var gui="width="+_33+",height="+_34+","+_35;
var win=window.open(url,_32,gui);
win.focus();
return win;
};
opt.core.toDate=function(str){
var _42;
if(typeof (str)=="date"){
_42=str;
}else{
_42=new Date(Date.parse(str));
if(_42=="Invalid Date"){
_42=new Date("1 January 1970 00:00:00");
}
}
return _42;
};
opt.core.getElementValue=function(_43,_44){
return opt.xml.getElementValue(_43,_44);
};
opt.core.getElementsByAttribute=function(_45,_46,_47,_48){
_46=_46.replace(/\|/g,"\\|").replace(/\[/g,"\\[").replace(/\(/g,"\\(").replace(/\+/g,"\\+").replace(/\./g,"\\.").replace(/\*/g,"\\*").replace(/\?/g,"\\?").replace(/\//g,"\\/");
if(!_47){
_47="*";
}
var _48=typeof _48!="undefined"?_48:false,cIterate=document.getElementsByTagName(_47),aResponse=[],attr,re=new RegExp(_48?"\\b"+_46+"\\b":"^"+_46+"$"),i=0,elm;
while((elm=cIterate.item(i++))){
attr=elm.getAttributeNode(_45);
if(attr&&attr.specified&&(re.test(attr.value)||opt.core.listFind(attr.value,_46))){
aResponse.push(elm);
}
}
return aResponse;
};
opt.core.addTableRow=function(_49,_4a){
var _4b=document.getElementById(_49);
var row=_4b.insertRow(_4b.rows.length);
var _4d="";
for(var i=0;i<_4a.length;i++){
_4d=row.insertCell(row.cells.length);
_4d.innerHTML=_4a[i];
}
};
opt.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;
};
opt.core.compare=function(a,b,asc,_54){
if(typeof (asc)=="undefined"){
asc=true;
}
if(typeof (_54)=="undefined"){
_54="string";
}
var _55=opt.core.uCase;
switch(_54){
case "number":
_55=opt.core.toNumber;
break;
case "date":
_55=opt.core.toDate;
break;
}
if(_55(a)<_55(b)){
return asc?-1:1;
}else{
if(_55(a)>_55(b)){
return asc?1:-1;
}else{
return 0;
}
}
};
opt.core.isMoz=function(){
var _56=false;
if(navigator.product){
if(navigator.product=="Gecko"){
_56=true;
}
}
return _56;
};
opt.core.addWindowOnLoad=function(f){
var _58=window.onload;
if(typeof window.onload!="function"){
window.onload=f;
}else{
window.onload=function(){
_58();
f();
};
}
};
opt.core.getEnter=function(evt,_5a){
if(opt.core.isMoz){
var key=evt.keyCode;
}else{
var key=evt.which;
}
if(key==13){
eval(_5a);
}
};
opt.core.toogle=function(_5c){
var el=document.getElementById(_5c);
if(el.style.display!="none"){
el.style.display="none";
}else{
el.style.display="";
}
};
opt.form={};
opt.form.setCheckboxValues=function(_5e,_5f){
var _60=document.getElementsByName(_5e);
var n=_60.length;
var _62=[];
if(_5f!=""){
_62=_5f.split(",");
}
for(var _63=0;_63<n;_63++){
if(_5f!=""&&opt.core.arrayFind(_62,_60[_63].value)!=-1){
_60[_63].checked=true;
}else{
_60[_63].checked=false;
}
}
};
opt.form.getCheckboxValues=function(_64,_65){
var _66=document.getElementsByName(_64);
var n=_66.length;
var _68="";
if(!_65){
_65="value";
}
for(var _69=0;_69<n;_69++){
if(_66[_69].checked==true&&_66[_69].getAttribute(_65)!=""){
if(_68!=""){
_68=_68+","+_66[_69].getAttribute(_65);
}else{
_68=_66[_69].getAttribute(_65);
}
}
}
return _68;
};
opt.form.checkRadioByValue=function(_6a,_6b){
var _6c=document.getElementsByTagName("input");
var _6d=false;
if(_6c){
for(var i=0;i<_6c.length;++i){
alert(_6c[i].name+" "+_6c[i].value);
if(_6c[i].type=="radio"&_6c[i].name==_6a){
if(_6c[i].value==_6b){
_6c[i].checked=true;
_6d=true;
}
}
}
}
return _6d;
};
opt.tag={};
opt.tag.showImage=function(){
var _6f=document.getElementsByTagName("a");
var _70="";
for(var i=0;i<_6f.length;i++){
if(_6f[i].getAttribute("opt:showImage")){
_70=_6f[i].getAttribute("href");
_6f[i].theImage=new Image();
_6f[i].theImage.src=_70;
if(_6f[i].getAttribute("opt:showImage")=="popup"){
_6f[i].onclick=openImage;
}else{
if(_6f[i].getAttribute("opt:showImage")=="page"){
_6f[i].onclick=viewImage;
}
}
}
}
function openImage(){
var _72="centerscreen";
var _73=618;
var _74=480;
var _75=this.getAttribute("title");
var _76=this.getAttribute("target");
if(!_76||_76=="_blank"){
_76="";
}
var _77=this.theImage.src;
var _78=5;
if(this.theImage.width>0){
_73=this.theImage.width-_78;
_74=this.theImage.height-_78;
}
var _79="<div align=\"center\"><img src=\""+_77+"\" border=\"0\" hspace=\"0\" vspace=\"0\" align=\"middle\"></div>";
var _7a="<!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>"+_75+"</title>"+"</head><body onload=\"self.focus();\" onblur=\"self.close()\">"+_79+"</body></html>";
var win=opt.core.openWin(null,_76,_73,_74,_72);
var tmp=win.document;
tmp.write(_7a);
tmp.close();
win.focus();
return false;
}
function viewImage(){
var _7d=this.getAttribute("target");
var _7e=this.getAttribute("href");
var _7f="optImageContainer";
var _80=document.getElementById(_7d);
if(_80){
if(document.getElementById(_7f)){
document.getElementById(_7f).setAttribute("src",_7e);
}else{
var _81="<img src=\""+_7e+"\" border=\"0\" id=\""+_7f+"\">";
_80.innerHTML=_81;
}
}
return false;
}
};
opt.validator={};
opt.validator.isEmail=function(str){
var re=new RegExp("^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w\\.-]{2,4}$");
if(re.test(str)){
return true;
}else{
return false;
}
};
opt.debug={};
opt.debug.out=function(str,_85){
if(!opt.conf.debugEnabled){
return;
}
switch(_85){
case "object":
alert(out.value);
out.innerHTML+=str;
break;
default:
document.getElementById(_85).innerHTML+=str;
break;
}
};
opt.debug.dumpProp=function(obj){
var str="";
var _88=[];
for(var p in obj){
_88.push(p);
}
_88.sort();
for(var i=0;i<_88.length;i++){
str+=_88[i]+": "+obj[i]+"\n";
}
return str;
};
opt.debug.Timer=function(){
this.timeStart=new Date();
this.getElapsedTime=function(){
var _8b=new Date();
var _8c=(_8b-this.timeStart)/1000;
return _8c;
};
};
opt.xml={};
opt.xml.getElementByNodeValue=function(doc,_8e,_8f,_90){
var res=[];
var el=doc.getElementsByTagName(_8e);
var _93;
for(var i=0;i<el.length;i++){
_93=el[i].getElementsByTagName(_8f);
for(var j=0;j<_93.length;j++){
if(_93[j].firstChild.nodeValue==_90){
res.push(el[i]);
break;
}
}
}
return res;
};
opt.xml.getElementValue=function(_96,_97){
if(!_96){
return false;
}
var el=_96.getElementsByTagName(_97).item(0);
if(el&&el.hasChildNodes()){
return el.firstChild.nodeValue;
}else{
return false;
}
};
opt.moz={};
opt.misc={};

