var isIE=(document.all)?true:false;
var isNS=(document.getElementById&&!isIE)?true:false;
var isOpera=(document.getElementById&&isIE)?true:false;
var isDHTML=(isIE||isNS)?true:false;
function XBElement(_1){
if(typeof (_1)=="string"){
_1=document.getElementById(_1);
}
if(_1==document){
return;
}
this.element=_1;
this.id=_1.id;
this.type="XBElement";
this.tagName=_1.tagName;
this.className=_1.className;
this.style=_1.style;
this.left=getObjStylePropertyValue(_1,"left");
this.top=getObjStylePropertyValue(_1,"top");
this.pageX=getObjPageX(_1);
this.pageY=getObjPageY(_1);
this.offsetLeft=_1.offsetLeft;
this.offsetTop=_1.offsetTop;
this.offsetWidth=_1.offsetWidth;
this.offsetHeight=_1.offsetHeight;
this.offsetParent=_1.offsetParent;
this.setAttribute=function(_2,_3){
eval("this."+_2+" = val");
};
this.getAttribute=function(_4){
return eval("this."+_4);
};
this.getParentElement=function(){
return (_1.parentNode!=null)?(new XBElement(_1.parentNode)):(null);
};
this.getFirstChild=function(){
return (_1.firstChild!=null)?(new XBElement(_1.firstChild)):(null);
};
this.getLastChild=function(){
return (_1.lastChild!=null)?(new XBElement(_1.lastChild)):(null);
};
this.getPreviousSibling=function(){
return (_1.previousSibling!=null)?(new XBElement(_1.previousSibling)):(null);
};
this.getNextSibling=function(){
return (_1.nextSibling!=null)?(new XBElement(_1.nextSibling)):(null);
};
this.getChildElements=function(){
var _5=new Array();
for(var i=0;i<_1.childNodes.length;i++){
_5[i]=new XBElement(_1.childNodes[i]);
}
return _5;
};
this.getStyleClass=function(){
return _1.className;
};
this.setStyleClass=function(_7){
_1.className=_7;
};
this.getStylePropertyValue=function(_8){
return getObjStylePropertyValue(this.element,_8);
};
this.setStylePropertyValue=function(_9,_a){
setObjStylePropertyValue(this.element,_9,_a);
};
this.getInnerHTML=function(){
return _1.innerHTML;
};
this.setInnerHTML=function(_b){
_1.innerHTML=_b;
};
this.addEventListener=function(_c,_d){
addObjEventListener(this.element,_c,_d);
};
this.removeEventListener=function(_e,_f){
removeObjEventListener(this.element,_e,_f);
};
};
function XBEvent(e){
this.AT_TARGET=1;
this.BUBBLING_PHASE=2;
this.CAPTURING_PHASE=3;
this.LEFT=0;
this.MIDDLE=1;
this.RIGHT=2;
this.event=e;
this.type=(isIE)?(e.type):(e.type);
this.target=XBEvent_getTarget(e);
this.currentTarget=XBEvent_getCurrentTarget(e);
this.eventPhase=(isIE)?(0):(e.eventPhase);
this.bubbles=(isIE)?(e.cancelBubble):(e.bubbles);
this.cancelable=(isIE)?((e.returnValue)?(e.returnValue):(false)):(e.cancelable);
this.timeStamp=(isIE)?(new Date().getTime()):(e.timeStamp);
this.stopPropagation=function(){
if(isIE){
e.cancelBubble=true;
}else{
e.stopPropagation();
}
};
this.preventCapture=function(){
if(isIE){
e.returnValue=false;
}else{
e.preventCapture();
}
};
this.preventDefault=function(){
if(this.cancelable){
if(isIE){
e.returnValue=false;
}else{
e.preventDefault();
}
}
};
this.screenX=e.screenX;
this.screenY=e.screenY;
this.clientX=e.clientX;
this.clientY=e.clientY;
this.pageX=e.clientX+getPageXOffset();
this.pageY=e.clientY+getPageYOffset();
this.ctrlKey=e.ctrlKey;
this.shiftKey=e.shiftKey;
this.altKey=e.altKey;
this.metaKey=(isIE)?(0):(e.metaKey);
if(this.type.indexOf("mouse")!=-1){
this.button=function(){
if(isIE){
switch(e.button){
case 1:
return this.LEFT;
case 2:
return this.RIGHT;
case 4:
return this.MIDDLE;
default:
return -1;
}
}else{
return e.button;
}
};
}else{
if(this.type.indexOf("click")!=-1){
this.button=function(){
return this.LEFT;
};
}
}
this.relatedTarget=XBEvent_getRelatedTarget(e);
this.keyCode=(isIE)?(parseInt(e.keyCode)):(parseInt(e.which));
};
function XBEvent_getTarget(e){
var _12=null;
if(isIE){
_12=e.srcElement;
}else{
var _13=e.target;
if(_13){
while(_13.nodeType!=1){
_13=_13.parentNode;
}
_12=_13;
}
}
if(_12!=null){
return _12;
}else{
return null;
}
};
function XBEvent_getCurrentTarget(e){
var _15=null;
if(isIE){
if(e.type.indexOf("mouseover")!=-1){
_15=e.toElement;
}else{
if(e.type.indexOf("mouseout")!=-1){
_15=e.fromElement;
}
}
}else{
_15=e.currentTarget;
}
if(_15!=null){
return _15;
}else{
return null;
}
};
function XBEvent_getRelatedTarget(e){
var _17=null;
if(isIE){
if(e.type.indexOf("mouseover")!=-1){
_17=e.fromElement;
}else{
if(e.type.indexOf("mouseout")!=-1){
_17=e.toElement;
}
}
}else{
_17=e.relatedTarget;
}
if(_17!=null){
return _17;
}else{
return null;
}
};
function addObjEventListener(obj,_19,_1a){
var _1b=false;
var _1c="obj.on"+_19.toLowerCase()+" = eventListener";
if(obj.addEventListener){
obj.addEventListener(_19,_1a,_1b);
}else{
if(obj.attachEvent){
obj.attachEvent("on"+_19,_1a);
}else{
eval(_1c);
}
}
};
function removeObjEventListener(obj,_1e,_1f){
var _20=false;
var _21="obj.on"+_1e.toLowerCase()+" = null";
if(obj.removeEventListener){
obj.removeEventListener(_1e,_1f,_20);
}else{
if(obj.detachEvent){
obj.detachEvent(_1e,_1f);
}else{
eval(_21);
}
}
};
function getObjStylePropertyValue(obj,_23){
var _24=null;
if(obj!=null&&obj!=document){
if(isIE){
_23=toJSPropertyName(_23);
_24=obj.currentStyle.getAttribute(_23);
}else{
if(isNS){
if(obj.nodeName.indexOf("text")==-1){
_24=obj.ownerDocument.defaultView.getComputedStyle(obj,"").getPropertyValue(_23);
}
}
}
}
return _24;
};
function setObjStylePropertyValue(obj,_26,_27){
_26=toJSPropertyName(_26);
eval("obj.style."+_26+" = value");
};
function getObjPageX(obj){
var num=0;
if(obj!=document){
for(var p=obj;p&&p.tagName!="BODY";p=p.offsetParent){
num+=p.offsetLeft;
}
}
return num;
};
function getObjPageY(obj){
var num=0;
if(obj!=document){
for(var p=obj;p&&p.tagName!="BODY";p=p.offsetParent){
num+=p.offsetTop;
}
}
return num;
};
function getClientWidth(_2e){
if(arguments.length==0){
_2e=window;
}
var doc=_2e.document;
var _30=0;
if(isIE){
_30=doc.documentElement.clientWidth;
}else{
if(isNS){
_30=_2e.innerWidth;
}
}
return _30;
};
function getClientHeight(_31){
if(arguments.length==0){
_31=window;
}
var doc=_31.document;
var _33=0;
if(isIE){
_33=doc.documentElement.clientHeight;
}else{
if(isNS){
_33=_31.innerHeight;
}
}
return _33;
};
function getPageWidth(_34){
if(arguments.length==0){
_34=window;
}
var doc=_34.document;
var _36=0;
if(isIE){
_36=doc.body.scrollWidth;
}else{
if(isNS){
_36=doc.width;
}
}
return _36;
};
function getPageHeight(_37){
if(arguments.length==0){
_37=window;
}
var doc=_37.document;
var _39=0;
if(isIE){
_39=doc.body.scrollHeight;
}else{
if(isNS){
_39=doc.height;
}
}
return _39;
};
function getPageXOffset(_3a){
if(arguments.length==0){
_3a=window;
}
var doc=_3a.document;
var _3c=0;
if(isIE){
_3c=doc.documentElement.scrollLeft;
}else{
if(isNS){
_3c=_3a.pageXOffset;
}
}
return _3c;
};
function getPageYOffset(_3d){
if(arguments.length==0){
_3d=window;
}
var doc=_3d.document;
var _3f=0;
if(isIE){
_3f=doc.documentElement.scrollTop;
}else{
if(isNS){
_3f=_3d.pageYOffset;
}
}
return _3f;
};
function toJSPropertyName(_40){
while(_40.lastIndexOf("-")!=-1){
var _41=_40.lastIndexOf("-");
var _42=_40.charAt(_41+1).toUpperCase();
_40=_40.substring(0,_41)+_42+_40.substring(_41+2);
}
return _40;
};
function getIFrameById(_43,_44){
if(arguments.length==1){
_44=window;
}
var doc=_44.document;
var _46=doc.getElementById(_43);
if(_46!=null&&_46.contentWindow){
return _46.contentWindow;
}else{
return _46;
}
};
function getIFrameDocumentById(_47,_48){
if(arguments.length==1){
_48=window;
}
var _49=null;
var _4a=getIFrameById(_47,_48);
if(_4a!=null&&_4a.contentDocument){
_49=_4a.contentDocument;
}else{
if(_4a!=null&&_4a.document){
_49=_4a.document;
}
}
return _49;
};
function inspect(obj){
var _4c="";
if(obj==null){
return null;
}else{
if(typeof (obj)=="string"){
return obj;
}else{
for(var i in obj){
if(typeof (obj[i])!="unknown"&&typeof (obj[i])!="undefined"){
_4c+=i+" ::: "+obj[i]+"<end>\n";
}else{
if(typeof (obj[i])=="unknown"){
_4c+=i+" ::: unknown<end>\n";
}else{
_4c+=i+" ::: undefined<end>\n";
}
}
}
return _4c;
}
}
};
function inspectStyle(obj){
var _4f="";
if(obj.style){
for(var i in obj.style){
if(typeof (obj.style[i])!="unknown"&&typeof (obj.style[i])!="undefined"){
_4f+=i+" ::: "+obj.style[i]+"<end>\n";
}else{
if(typeof (obj[i])=="unknown"){
_4f+=i+" ::: unknown<end>\n";
}else{
_4f+=i+" ::: undefined<end>\n";
}
}
}
}else{
_4f+="Error: style is undefined in this object.";
}
return _4f;
};
function showMouseMoveStatus(_51){
if(_51){
addObjEventListener(document,"mousemove",XBDebug_mouseMoveListener);
}else{
removeObjEventListener(document,"mousemove",XBDebug_mouseMoveListener);
}
};
function XBDebug_mouseMoveListener(evt){
var e=new XBEvent(evt);
var _54="Mouse Status:";
_54+=" ClientX: "+e.clientX;
_54+=" ClientY: "+e.clientY;
_54+=" PageX: "+e.pageX;
_54+=" PageY: "+e.pageY;
_54+=" ScreenX: "+e.screenX;
_54+=" ScreenY: "+e.screenY;
window.status=_54;
};
function openModalDialog(url,_56,_57,_58,_59){
var _5a="";
var _5b=(new Date()).getMilliseconds().toString();
var _5c=_56;
var _5d=_57;
var _5e=new Object();
var _5f=null;
for(i in _59){
_5e[i]=_59[i];
}
_5e.timeout=false;
if(isIE&&!isOpera){
_5a="dialogWidth: "+_5c+"px; dialogHeight: "+_5d+"px; center; status: no; help: no;";
_5a+=(_58)?(" scroll: yes;"):(" scroll: no;");
_5f=window.showModalDialog(url,_5e,_5a);
if(_5e.timeout==true){
top.close();
}
return _5f;
}else{
if(isOpera){
window.returnValue=null;
for(i in _59){
alert(_59[i]);
}
if(window.returnValue!=null){
return window.returnValue;
}
}else{
_5c=(_5c-20<=0)?(_5c):(_5c-20);
_5d=(_5d-20<=0)?(_5d):(_5d-20);
var _60=window.screenX+((window.outerWidth-parseInt(_5c))/2);
var _61=window.screenY+((window.outerHeight-parseInt(_5d))/2);
window.dialogArguments=_5e;
_5a="screenX="+_60+", screenY="+_61+", width="+_5c+"px, height="+_5d+"px, modal=yes, sidebars=no, menubars=no";
_5a+=(_58)?(", scrollbars=yes"):(", scrollbars=no");
window.returnValue=null;
window.open(url,_5b,_5a);
if(window.returnValue!=null){
return window.returnValue;
}
}
}
};
function autoResizeModalDialog(){
var _62=getPageWidth()-getClientWidth();
var _63=getPageHeight()-getClientHeight();
if(isIE){
window.dialogWidth=parseInt(window.dialogWidth)+_62+-15+"px";
window.dialogHeight=parseInt(window.dialogHeight)+_63-15+"px";
}else{
if(isNS){
window.sizeToContent();
}
}
};
function openWindow(url,_65,_66,_67){
if(_67==null){
_67="resizable=yes,scrollbars=yes,menubar=yes, copyhistory=no";
}
if(_66==null){
_66=0;
}
_66+=20;
if(navigator.appName=="Netscape"){
if(parseInt(navigator.appVersion)>3){
if(_67.indexOf(",width=")<0){
_67+=",width="+top.innerWidth+",height="+top.innerHeight;
}
_67+=",screenX="+(top.screenX+_66)+",screenY="+(top.screenY+_66);
}else{
if(_67.indexOf(",width=")<0){
_67+=",width="+top.width+",height="+top.height;
}
}
}else{
if(_67.indexOf(",width=")<0){
var _68=",width=",_69=",height=";
if(screen.width<750){
_68+=screen.availWidth;
}else{
_68+="750";
}
if(screen.height<500){
_69+=screen.availHeight;
}else{
_69+="500";
}
_67+=_68+_69;
}
_67+=",screenLeft="+(screen.availLeft+_66)+",screenTop="+(screen.availTop+_66);
}
var _6a=window.open("",_65,_67);
_6a.location.href=url;
var _6b=navigator.appVersion;
if(_6b.indexOf("MSIE 4.01")==-1){
_6a.focus();
}
return _6a;
};
function defined(obj){
var str=typeof obj;
if((str=="undefined")||(obj==null)){
return false;
}else{
return true;
}
};
function objectType(obj){
var _6f=(String)(obj.constructor);
var _70=_6f.split(" ");
for(var i=0;i<_70.length;i++){
if(_70[i].indexOf("function")!=-1){
var end=_70[i+1].indexOf("(");
if(end==-1){
return (_70[i+1]);
}else{
return (_70[i+1].substring(0,end));
}
}
}
};
function trim(_73){
word=_73.toString();
var i=0;
var j=word.length-1;
while(word.charAt(i)==" "){
i++;
}
while(word.charAt(j)==" "){
j--;
}
if(i>j){
return word.substring(i,i);
}else{
return word.substring(i,j+1);
}
};
function isInputStringEmpty(id){
return !id.match(/[^\s]/);
};
function reprompt(_77,_78){
window.status="";
alertDialog(_78);
_77.focus();
_77.select();
};
function removeReturnChar(_79){
var i=0;
var j=_79.length;
var _7c="";
for(i=0;i<j;++i){
if((_79.charAt(i)=="\r")||(_79.charAt(i)=="\n")){
_7c+=" ";
}else{
_7c+=_79.charAt(i);
}
}
return _7c;
};
function find(_7d,_7e){
for(var i=0;i<_7e.length;i++){
var _80=_7e.substring(i,i+1);
if(_7d.indexOf(_80)!=-1){
return _80;
}
}
return "false";
};
function numOfOccur(_81,_82){
var _83=0;
for(var i=0;i<_81.length;i++){
if(_81.charAt(i)==_82.charAt(0)){
_83++;
}
}
return _83;
};
function convertFromTextToHTML(obj){
var _86=new String(obj);
var _87="";
for(var i=0;i<_86.length;i++){
if(_86.charAt(i)=="<"){
_87+="&lt;";
}else{
if(_86.charAt(i)==">"){
_87+="&gt;";
}else{
_87+=_86.charAt(i);
}
}
}
return _87;
};
function convertFromHTMLToText(obj){
var _8a=new String(obj+"_____");
var _8b="";
for(var i=0;i<_8a.length;){
if(_8a.charAt(i)=="&"){
if(_8a.substring(i,i+4)=="&lt;"){
_8b+="<";
i+=4;
}else{
if(_8a.substring(i,i+4)=="&gt;"){
_8b+=">";
i+=4;
}else{
_8b+=_8a.charAt(i);
i++;
}
}
}else{
_8b+=_8a.charAt(i);
i++;
}
}
return _8b.substring(0,_8b.length-5);
};
function isEmpty(id){
if(typeof (id)=="string"){
return !id.match(/[^\s]/);
}else{
return (id)?(false):(true);
}
};
function validTime(_8e){
var _8f=":";
var hh,mm;
var _92;
var _93;
var _94;
_92=_8e.length;
if(_8e==""||_8e.indexOf(_8f)==-1||_92>5){
return false;
}
hh=_8e.substring(0,_8e.indexOf(_8f));
mm=_8e.substring(_8e.indexOf(_8f)+1);
_93=hh.length;
_94=mm.length;
if(_93<1||_93>2||_94<1||_94>2){
return false;
}
if(hh==""||mm==""){
return false;
}
if(isNaN(hh)||isNaN(mm)){
return false;
}
if(parseInt(hh)>23||parseInt(hh)<0){
return false;
}
if(parseInt(mm)>59||parseInt(mm)<0){
return false;
}
return true;
};
function limitTextArea(_95,_96){
if(_95.value.length>_96){
_95.value=_95.value.substring(0,_96);
}
};
function isValidName(_97){
var _98="~!@#$%^&*()+=[]{};:,<>?/|`";
_98+="\t'\"\\";
var _99="0123456789";
if(isEmpty(_97)){
return false;
}
for(var i=0;i<_97.length;i++){
if(_98.indexOf(_97.substring(i,i+1))>=0){
return false;
}
}
var _9b=_97.substring(0,1);
for(var i=0;i<_99.length;i++){
if(_99.indexOf(_9b)>=0){
return false;
}
}
return true;
};
function dumpObject(_9c){
var _9d="";
for(i in _9c){
if(typeof _9c[i]=="object"){
_9d+=dumpObject(_9c[i]);
}else{
_9d+=i+" = "+_9c[i]+"\n";
}
}
return _9d;
};
function cloneObject(_9e){
for(i in _9e){
if(typeof i=="object"){
this[i]=new cloneObject(_9e[i]);
}else{
this[i]=_9e[i];
}
}
};
function isValidPositiveInteger(_9f){
var _a0="0123456789";
if(isEmpty(_9f)){
return false;
}
for(var i=0;i<_9f.length;i++){
if(_a0.indexOf(_9f.substring(i,i+1))=="-1"){
return false;
}
}
if(_9f.length>1&&_9f.substring(0,1)=="0"){
return false;
}
return true;
};
function isValidNZPosInt(_a2){
var _a3="0123456789";
if(isEmpty(_a2)){
return false;
}
for(var i=0;i<_a2.length;i++){
if(_a3.indexOf(_a2.substring(i,i+1))=="-1"){
return false;
}
}
if(_a2.substring(0,1)=="0"){
return false;
}
return true;
};
function isValidUTF8length(_a5,_a6){
if(utf8StringByteLength(_a5)>_a6){
return false;
}else{
return true;
}
};
function utf8StringByteLength(_a7){
if(_a7===null){
return 0;
}
var str=String(_a7);
var _a9=127;
var _aa=2047;
var _ab=str.length;
for(i=0;i<str.length;i++){
chr=str.charCodeAt(i);
if(chr>_a9){
_ab=_ab+1;
}
if(chr>_aa){
_ab=_ab+1;
}
}
return _ab;
};
function alertDialog(_ac,_ad,_ae,_af){
if(typeof (_ac)=="undefined"){
_ac="undefined";
}
var _b0=new Array();
_b0.message=_ac;
var url="AlertView?storeId="+_ad+"&catalogId="+_ae+"&langId="+_af;
openModalDialog(url,375,140,true,_b0);
};

