function showFrameContainer(h,b,g,a,d,s,o,k,r){if(document.getElementById){var n=document.getElementById(h);var p=document.getElementById(b);var m=document.getElementById(g);if(p.style.display=="block"){p.style.display="none";return false}if(m.src!=a){m.src=a}var j=0;var u=0;aTag=n;do{aTag=aTag.offsetParent;j+=aTag.offsetLeft;u+=aTag.offsetTop}while(aTag.offsetParent&&aTag.tagName!="body");var i=n.offsetLeft+j;if(o){i+=o}var q=n.offsetTop+u;if(k){q+=k}if(!d){d=parseInt(p.style.width)}if(d&&((i+d)>getBrowserWidth())){i=getBrowserWidth()-d-40}if(i<0){i=0}p.style.position="absolute";p.style.left=i+"px";p.style.top=q+"px";p.style.display="block";return false}else{window.open(a)}}function openCurrencyConverter(c,b,a){if(document.getElementById){document.getElementById("b_amount").value=b;document.getElementById("b_sourceCurrency").value=a;document.getElementById("b_currencyResults").style.display="none";positionObj(document.getElementById(c),"b_currencyConverterPopup");document.getElementById("b_currencyConverterPopup").style.display="block"}}function calculateCurrency(){if(document.getElementById){var b=document.getElementById("b_amount").value;var e=currencydb[document.getElementById("b_sourceCurrency").value];var d=currencydb[document.getElementById("b_destinationCurrency").value];var c=Math.round(100*b*(d.val/e.val))/100;document.getElementById("b_displayCurrencyResults").innerHTML=e.symbol+" "+b+" = "+d.symbol+" "+c;document.getElementById("b_currencyResults").style.display="block";return false}}function closeCurrencyConverter(){if(document.getElementById){document.getElementById("b_displayCurrencyResults").innerHTML="";document.getElementById("b_currencyResults").style.display="none";document.getElementById("b_currencyConverterPopup").style.display="none"}}function showDiv(b,a,f,e){if(document.getElementById){var h=document.getElementById(b);var j=document.getElementById(a);if(j.style.display!="block"){var g=0;var m=0;aTag=h;do{aTag=aTag.offsetParent;g+=aTag.offsetLeft;m+=aTag.offsetTop}while(aTag.offsetParent&&aTag.tagName!="body");var d=h.offsetLeft+g;var k=h.offsetTop+m+h.offsetHeight+2;if(f=="left"&&j.style.width){d=d-parseInt(j.style.width)}if(e=="top"&&j.style.height){k=k-parseInt(j.style.height)-25}j.style.position="absolute";j.style.left=d+"px";j.style.top=k+"px";j.style.display="block"}else{j.style.display="none"}}}function positionObj(a,c){if(document.getElementById){var g=document.getElementById(c);var i=getBrowserWidth();var f=0;var j=0;aTag=a;do{aTag=aTag.offsetParent;f+=aTag.offsetLeft;j+=aTag.offsetTop}while(aTag.offsetParent&&aTag.tagName!="body");var d=a.offsetLeft+f;var b=300;if(d+b>i){d=i-b-30}var h=a.offsetTop+j+a.offsetHeight+2;g.style.position="absolute";g.style.left=d+"px";g.style.top=h+"px"}}function fillContentIframe(c,d){if(document.getElementById(c).contentDocument){var a=document.getElementById(d).innerHTML;var b=document.getElementById(c);b.contentDocument.getElementById("b_dynamicIframe").innerHTML=a}else{if(document.getElementById(c).Document){var a=document.getElementById(d).innerHTML;var b=document.getElementById(c);b.Document.getElementById("b_dynamicIframe").innerHTML=a}else{return false}}}function popup(c,b,e,a,d){newwindow=window.open(c,"popup1","width="+b+",height="+e+",left="+a+",top="+d+",menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");if(window.focus){newwindow.focus()}}function enterGuestname(d,a){var b=a;var c=document.getElementById(d);if(c.value==""){c.value=b}}function onchange_cc(g){if(g){var a=document.getElementById("dc_issue_error");var b=document.getElementById("dc_issue_label");var c=document.getElementById("dc_issue_field");var j=document.getElementById("dc_yyyymm_label");var i=document.getElementById("dc_yyyymm_field");var d=document.getElementById("cc_cvc_error");var f=document.getElementById("cc_cvc_label");var e=document.getElementById("cc_cvc_field");if(a){a.style.display="none"}if(b&&c){b.style.display="none";c.style.display="none"}if(j&&i){j.style.display="none";i.style.display="none"}if(d){d.style.display="none"}if(f&&e){f.style.display="none";e.style.display="none"}var h=((g.options[g.selectedIndex].innerHTML).toLowerCase()).trim();switch(h){case"american express":case"visa":case"mastercard":if(d){d.style.display=""}if(f){f.style.display="";e.style.display=""}break;case"diners club":break;case"maestro (switch)":if(d){d.style.display=""}if(f&&e){f.style.display="";e.style.display=""}if(a){a.style.display=""}if(b&&c){b.style.display="";c.style.display=""}if(j&&i){j.style.display="";i.style.display=""}break}}}String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,"")};window.onload=function(){var a=document.getElementById("b_ccType");if(a&&(a.type=="select-one"||a.type=="select.one")){onchange_cc(a)}};String.prototype.deCode=function(){return this.replace(/[a-zA-Z]/g,function(a){return String.fromCharCode((a<="Z"?90:122)>=(a=a.charCodeAt(0)+13)?a:a-26)})};
