var mp3_playingId="";function mp3player_startPlay(a){if(""!=mp3_playingId&&mp3_playingId!=a){var b=getFlashMovieObject(mp3_playingId);b.mp3player_stopPlay();}mp3_playingId=a;}function getFlashMovieObject(a){if(window.document[a]){return window.document[a];}if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[a]){return document.embeds[a];
}}else{return document.getElementById(a);}}var InputSelector=Class.create();InputSelector.prototype={initialize:function(e,h,f,i,g,b,j,a,d,c){this.top=1;this.bottom=0.4;this.max=11;this.isCheckAllButtonVisible=true;this.version="InputSelector";this.fakeOuter=e;this.fakeInner=h;this.realInput=f;this.listOfValues=i;
this.selectedListOfValues=$H(g);this.popupInputs=$A();this.popup=b||this.createPopupContainer(0,200);this.popupIframe=this.createPopupIframeContainer(0,200);this.popupAutoListener();this.doAjax=true;this.view=j||{width:150,count:1};this.searchUrl=a;this.form=d;this.formOuter=c;this.setUpListeners();this.startHTML=this.fakeInner.innerHTML;
this.drawSelectorInput();},setUpListeners:function(){this.fakeOuter.observe("click",function(){if(this.popup.getStyle("display")=="none"){if(this.doAjax){this.createWaitingEffect(this.top,this.bottom);this.createAjaxQuery();}else{this.drawPopUpElement(this.fakeOuter,this.view);this.drawSelectorInput();
}}else{this.popup.hide();}}.bindAsEventListener(this));},drawSelectorInput:function(){var b="";var c=this.selectedListOfValues.keys();this.realInput.value="";for(var a=0;a<c.length;a++){b+=this.selectedListOfValues.get(c[a])+", ";this.realInput.value+=c[a]+",";}this.fakeInner.setAttribute("title",b);
if(b.length>this.max){b=b.substr(0,this.max)+" ...";}else{if(b==""){b=this.startHTML;}}this.fakeInner.innerHTML=b;},createAjaxQuery:function(){new Ajax.Request(this.searchUrl["url"]+this.searchUrl["param_prefix"]+this.searchUrl["param_value"],{onComplete:function(a){this.doAjax=false;this.listOfValues=$H(a.responseText.evalJSON());
this.drawPopUpElement(this.fakeOuter,this.view);this.createAfterFinishEffect(this.bottom,this.top);this.drawSelectorInput();}.bindAsEventListener(this)});},createWaitingEffect:function(b,a){this.toggleLoading(true);new Effect.Opacity(this.formOuter,{from:b,to:a,duration:0.2});},createAfterFinishEffect:function(b,a){new Effect.Opacity(this.formOuter,{from:b,to:a,duration:0.2});
this.toggleLoading(false);},toggleLoading:function(a){if(this.loader==null){this.loader=new Element("img",{src:"/images/ajax-loader.gif",className:"searchLoader"});this.formOuter.appendChild(this.loader);}if(a){this.loader.show();}else{this.loader.hide();}},rowListener:function(a){}.bindAsEventListener(this),setUpOnUpdateListener:function(a){this.onUpdateListener=a;
},createPopupContainer:function(a,d){var b=$("inputSelectorDivId");if(b){return b;}var c=new Element("div",{id:"inputSelectorDivId",style:"display:none;"+"z-index:1001;"+"position:absolute;"+"left:"+a+"px;"+"top:"+d+"px;"});document.body.appendChild(c);c.addClassName("search_elem_over");return c;},createPopupIframeContainer:function(a,d){var c=$("inputSelectorIframeId");
if(c){return c;}var b=new Element("iframe",{id:"inputSelectorIframeId",style:"position:absolute; "+"z-index:1000;"+"display:none;"+"padding:0;margin:0;"+"background:white;"+"left:"+a+"px;"+"top:"+d+"px;"+"border:0",src:"/flash/blank.html"});document.body.appendChild(b);return b;},setSelectedList:function(){this.popupInputs=$A(this.popup.select("input"));
this.popupInputs.each(function(a){if(a.checked){this.selectedListOfValues.set(a.value,this.listOfValues.get(a.value));this.drawItemListText(a.value,"disabled");}else{this.selectedListOfValues.unset(a.value);if(a.disabled){this.drawItemListText(a.value,"disabled",true);}else{this.drawItemListText(a.value,"disabled");
}}}.bindAsEventListener(this));this.drawSelectorInput();},clearSelections:function(){this.selectedListOfValues=$H();this.drawSelectorInput();},drawItemListText:function(c,b,a){if(a){$("span_"+c).addClassName(b);}else{$("span_"+c).removeClassName(b);}},drawPopUpElement:function(c,b){b["count"]=b["count"]||1;
b["width"]=b["width"]||220;this.popup.setStyle({width:(b["count"]*b["width"]+2)+"px"});var e="";e+=this.drawMenu();e+="<div class='inner_over'> ";e+=this.drawInputList(b);e+="<div class='clearing'> </div>";e+="</div>";this.popup.hide();this.popupIframe.hide();this.popup.update(e);this.setMenuListener();
this.popupInputs=$A(this.popup.select("input"));this.popupInputs.each(function(f){f.observe("click",function(){this.rowListener(f);this.setSelectedList();}.bindAsEventListener(this));}.bindAsEventListener(this));var a=this.getOffset($(c));var d=$(c).getHeight();this.popup.setStyle({top:(a["top"]+d+2)+"px",left:(a["left"]+1)+"px"});
this.popupIframe.setStyle({top:(a["top"]+d+2)+"px",left:(a["left"]+1)+"px",width:(b["count"]*b["width"]+2)+"px",height:(this.popup.getHeight()+2)+"px"});Effect.BlindDown(this.popup);Effect.BlindDown(this.popupIframe);},getOffset:function(b){var a=0,c=0;do{if(b.id!="header"&&b.id!="global"){a+=b.offsetTop||0;
}c+=b.offsetLeft||0;b=b.offsetParent;}while(b);return Element._returnOffset(c,a);},drawMenu:function(){this.menu_template="selector_template_menu";this.menu=$(this.menu_template);var a=this.menu.innerHTML;return a;},setMenuListener:function(){var a=this.isCheckAllButtonVisible;var e=this.popup.select(".bordered_bottom")[0];
var d=$(e.select(".close")[0]);d.observe("click",function(){this.popup.hide();this.popupIframe.hide();}.bindAsEventListener(this));var c=$(e.select(".none")[0]);c.observe("click",function(){this.uncheckAllAdditionalListener();this.uncheckAllListener();this.setSelectedList();}.bindAsEventListener(this));
var b=$(e.select(".all")[0]);b.setStyle({display:(a)?"":"none"});b.observe("click",function(){this.checkAllListener();this.setSelectedList();}.bindAsEventListener(this));},uncheckAllListener:function(){this.selectedListOfValues=$H();this.drawSelectorInput();this.popupInputs.each(function(a){a.checked=false;
a.disabled=false;});},uncheckAllAdditionalListener:function(){},checkAllListener:function(){this.selectedListOfValues=this.listOfValues;this.drawSelectorInput();this.popupInputs.each(function(a){a.checked=true;a.disabled=false;});},drawInputList:function(a){var c="";var b="";var d="";$A(this.listOfValues).each(function(e){b="";
d="";c+="<span class='item'>";if(this.selectedListOfValues.get(e.key)){b=" checked='checked' ";}else{if(this.setDisabled(e.key)){b+=" disabled='true' ";d=" class='disabled'";}}c+="<input type='checkbox' value='"+e.key+"'"+b+" name='"+e.value+"_"+e.key+"'/> ";c+="<span"+d+' id="span_'+e.key+'">';c+=e.value;
c+="</span>";c+="</span>";}.bindAsEventListener(this));return c;},setDisabled:function(a){return false;},isAllUnChecked:function(){return true;},popupAutoListener:function(){this.popupListening();this.windowListening();},windowListening:function(){Event.observe(document.body,"click",function(a){a.cancelBubble=false;
this.popup.hide();this.popupIframe.hide();}.bindAsEventListener(this));},popupListening:function(){Event.observe(this.popup,"click",function(a){a.cancelBubble=true;}.bindAsEventListener(this));},showVersion:function(){window.alert(this.version);}};var ProductAndCategorySearchSelector=Class.create();ProductAndCategorySearchSelector.prototype={initialize:function(d,e,b,a,c){this.linked=$H(e);
this.searchUrl=d;this.currentProduct=$H(c["product"]).keys()[0]||1;this.products=$H();this.categories=$H();this.selectedProducts=$H(c["product"])||$H();this.selectedCategories=$H(c["category"])||$H();this.linked.each(function(f){this.categories.set(f.value,$H());}.bind(this));this.params={category:"?value=categories&id=",product:"?value=products"};
this.productSelector=new InputSelector($(b.outer_id),$(b.inner_id),$(b.outer_id).select("input")[0],this.products,this.selectedProducts,null,{count:1,width:220},{url:this.searchUrl,param_prefix:this.params.product,param_value:""},$(b.inner_form),$(b.outer_form));this.productSelector.rowListener=this.rowListener;
this.productSelector.setDisabled=this.setDisabled;this.productSelector.isAllUnChecked=this.isAllUnChecked;this.productSelector.uncheckAllAdditionalListener=this.uncheckAllAdditionalListener;this.productSelector.isCheckAllButtonVisible=false;this.categorySelector=new InputSelector($(a.outer_id),$(a.inner_id),$(a.outer_id).select("input")[0],this.categories.get(this.linked.get(this.currentProduct)),this.selectedCategories,null,{count:4,width:160},{url:this.searchUrl,param_prefix:this.params.category,param_value:this.currentProduct},$(a.inner_form),$(a.outer_form));
this.productSelector.categories=this.categories;this.productSelector.linked=this.linked;this.productSelector.categorySelector=this.categorySelector;this.productSelector.baseProduct="1";this.productSelector.baseCategoryOfProduct=this.linked.get(this.productSelector.baseProduct);this.productSelector.selectedProduct=this.currentProduct;
this.productSelector.selectedCategoryOfProduct=this.linked.get(this.currentProduct);},uncheckAllAdditionalListener:function(){this.selectedProduct=this.baseProduct;this.selectedCategoryOfProduct=this.baseCategoryOfProduct;var c=this.categorySelector.listOfValues.keys().length==this.categories.get(this.selectedCategoryOfProduct).keys().length;
if(c){for(var b=0;b<this.categorySelector.listOfValues.keys();b++){var a=this.categorySelector.listOfValues.keys()[b];c=this.categorySelector.listOfValues.get(a)==this.categories.get(this.selectedCategoryOfProduct).get(a);if(!c){break;}}}this.categorySelector.searchUrl["param_value"]=this.selectedProduct;
this.categorySelector.listOfValues=this.categories.get(this.selectedCategoryOfProduct);if(!c){this.categorySelector.uncheckAllListener();}},setDisabled:function(a){if(this.selectedListOfValues.keys().length>0){return !(this.linked.get(a)==this.linked.get(this.selectedProduct));}else{return false;}},isAllUnChecked:function(){var b=true;
for(var a=0;a<this.popupInputs.length;a++){if(this.popupInputs[a].checked){b=false;break;}}return b;},rowListener:function(b){var c=this.selectedCategoryOfProduct;this.categories.set(c,this.categorySelector.listOfValues);this.selectedProduct=b.value;this.selectedCategoryOfProduct=this.linked.get(this.selectedProduct);
if(this.isAllUnChecked()){for(var a=0;a<this.popupInputs.length;a++){this.popupInputs[a].disabled=false;}this.selectedProduct=this.baseProduct;this.selectedCategoryOfProduct=this.baseCategoryOfProduct;}else{for(var a=0;a<this.popupInputs.length;a++){this.popupInputs[a].disabled=this.linked.get(this.popupInputs[a].value)!=this.linked.get(this.selectedProduct);
}}this.categorySelector.searchUrl["param_value"]=this.selectedProduct;this.categorySelector.doAjax=this.categories.get(this.selectedCategoryOfProduct).keys().length==0;this.categorySelector.listOfValues=this.categories.get(this.selectedCategoryOfProduct);if(c!=this.selectedProduct){this.categorySelector.uncheckAllListener();
}},createPopupContainer:function(a,c){var b=new Element("div",{style:"display:none;"+"position:absolute;"+"left:"+a+"px;"+"top:"+c+"px;"});document.body.appendChild(b);b.addClassName("search_elem_over");return b;}};var HeaderProductAndCategorySearchSelector=Class.create(ProductAndCategorySearchSelector);
var AdvansedProductAndCategorySearchSelector=Class.create(ProductAndCategorySearchSelector);var AuthorSearchSelector=Class.create();AuthorSearchSelector.prototype={initialize:function(a,c,b){this.authors=$H();this.searchUrl=a;this.selectedAuthors=$H(c)||$H();this.authorSelector=new InputSelector($(b.outer_id),$(b.inner_id),$(b.outer_id).select("input")[0],this.authors,this.selectedAuthors,null,{count:4,width:160},{url:this.searchUrl,param_prefix:"?value=authors",param_value:""},$(b.inner_form),$(b.outer_form));
}};var LeftCategoryToggle=Class.create();LeftCategoryToggle.prototype={initialize:function(b,a){this.products=b;this.options=Object.extend(this.prepareElementsIdsNames(),a);this.product={};this.no_empty={};this.toggle={};this.toggleAll={};$A(this.products).each(function(c){this.prepareAllListsForProduct(c);
}.bind(this));$A(this.products).each(function(c){this.attachObservers(c);}.bind(this));this.setupAllGroups();},setupAllGroups:function(){if(this.options.currentProduct!=""){setCookie("left_product_"+this.options.currentProduct,"all");}},prepareElementsIdsNames:function(){return{currentProduct:"",productGroup:{prefix:"product",suffix:"_group"},noEmptyGroup:{prefix:"no_empty_product",suffix:"_group"},toggleAll:{prefix:"product",open_suffix:"_open_all",close_suffix:"_close_all"},toggle:{prefix:"product",open_suffix:"_open",close_suffix:"_close"}};
},prepareAllListsForProduct:function(a){this.product[a]=$(this.options.productGroup["prefix"]+a+this.options.productGroup["suffix"]);this.toggle[a]={};this.toggleAll[a]={};try{this.no_empty[a]=$(this.options.noEmptyGroup["prefix"]+a+this.options.noEmptyGroup["suffix"]);this.toggle[a]["close"]=$(this.options.toggle["prefix"]+a+this.options.toggle["close_suffix"]);
this.toggle[a]["open"]=$(this.options.toggle["prefix"]+a+this.options.toggle["open_suffix"]);}catch(b){}this.toggleAll[a]["close"]=$(this.options.toggleAll["prefix"]+a+this.options.toggleAll["close_suffix"]);this.toggleAll[a]["open"]=$(this.options.toggleAll["prefix"]+a+this.options.toggleAll["open_suffix"]);
},attachObservers:function(a){this.attachObserversForTopToggleButton(a);this.attachObserversForBottomToggleButton(a);},attachObserversForTopToggleButton:function(a){this.toggleAll[a]["close"].observe("click",function(){Effect.BlindUp(this.product[a],{duration:0.2});this.toggleAll[a]["close"].hide();this.toggleAll[a]["open"].show();
try{this.toggle[a]["open"].hide();this.toggle[a]["close"].hide();}catch(b){}setCookie("left_product_"+a,"none");}.bind(this));this.toggleAll[a]["open"].observe("click",function(){if(this.product[a].getStyle("display")=="none"){try{this.no_empty[a].show();this.toggle[a]["close"].show();}catch(b){}Effect.BlindDown(this.product[a],{duration:0.2});
}else{try{if(this.no_empty[a].getStyle("display")=="none"){this.toggle[a]["close"].show();Effect.BlindDown(this.no_empty[a],{duration:0.2});}}catch(b){}}this.toggleAll[a]["open"].hide();this.toggleAll[a]["close"].show();try{this.toggle[a]["open"].hide();this.toggle[a]["close"].show();}catch(b){}setCookie("left_product_"+a,"all");
}.bind(this));},attachObserversForBottomToggleButton:function(b){try{this.toggle[b]["close"].observe("click",function(){Effect.BlindUp(this.no_empty[b],{duration:0.2});this.toggle[b]["close"].hide();this.toggleAll[b]["close"].hide();this.toggleAll[b]["open"].show();setCookie("left_product_"+b,"",-1);
}.bind(this));this.toggle[b]["open"].observe("click",function(){Effect.BlindDown(this.no_empty[b],{duration:0.2});this.toggle[b]["open"].hide();this.toggle[b]["close"].show();this.toggleAll[b]["open"].hide();this.toggleAll[b]["close"].show();setCookie("left_product_"+b,"all");}.bind(this));}catch(a){}}};
var LanguageToggle=Class.create();LanguageToggle.prototype={initialize:function(c,a,b){this.buttonBuy=$(c);this.list=$(a);this.corners=$(b);$(this.list).setStyle({display:"none"});this.attachObservers();},attachObservers:function(){this.attachObserverToButton();this.attachObserverToBody();},attachObserverToBody:function(){Event.observe(document.body,"click",function(a){a.cancelBubble=false;
this.closeList();}.bindAsEventListener(this));},attachObserverToButton:function(){if($(this.list).childElements().length>0){$(this.buttonBuy).observe("click",function(a){if(this.list.getStyle("display")=="none"){this.openList();}else{this.closeList();}}.bindAsEventListener(this));}},openList:function(){this.corners.hide();
Effect.SlideDown(this.list,{duration:0.2});},closeList:function(){this.list.hide();this.corners.show();}};var ItemTooltipList=Class.create({initialize:function(b,a,c){this.items=$$("."+b);this.descriptionItems=$$("."+a);this.host=c||"";var d=0;$A(this.items).each(function(e){this.setBigPreview(e,d);d++;
}.bind(this));$A(this.descriptionItems).each(function(e){this.setAjaxPreview(e);}.bind(this));},setAjaxPreview:function(a){var b="<img src='/images/groupview-loader.gif'/> Loading ...";new ToolTip(a,b,{className:"darktip"},this.host+"/service/jsonPopup.do?type=groupview&viewId="+a.getAttribute("viewid"));
},setBigPreview:function(b,h){try{var d=b.getAttribute("name").evalJSON();var g="";var a;g+="<p class='bold align_center' style='width:"+d[0]+"px'>"+d[2]+" #"+d[3]+"</p>";g+="<div class='loading_preview' id='line_"+h+"-"+d[3]+"'>Loading...<br/><div class='loading_out'><div class='loading_in' style='width:50px;'> </div></div></div>";
g+="<div class='align_center'  style='width:"+d[0]+"px;height:"+d[1]+"px;'><img onload=\"clearInt()\" src='"+d[4]+"' alt='"+d[5]+"' title='"+d[6]+"'/></div>";var c=new ToolTip(b,g,{className:"image_preview",delay:2000});c.onStartAction=function(){loader("loading_in","loading_out","line_"+h+"-"+d[3]);
};c.onOutAction=function(){clearInt();$(c.outer).hide();$(c.outerIframe).hide();};$(b.id).onclick=function(){$(c.outer).hide();$(c.outerIframe).hide();};}catch(f){}}});var inner_loading;var outer_loading;var full_loading;var timer;function loader(c,b,a){try{full_loading=$(a);inner_loading=$$("#"+a+" ."+c)[0];
outer_loading=$$("#"+a+" ."+b)[0];full_loading.style.display="";timer=setInterval("move()",30);}catch(d){}}function move(){try{if(inner_loading.offsetLeft>=outer_loading.clientWidth){inner_loading.style.left="-"+inner_loading.getStyle("width");}else{inner_loading.style.left=(inner_loading.offsetLeft+6)+"px";
}}catch(a){}}function clearInt(){try{full_loading.style.display="none";inner_loading.style.left="-"+inner_loading.style.width;clearInterval(timer);}catch(a){}}var DownloadList=Class.create({initialize:function(e,d,b,c,a){this.messages=$H(e);this.autoRefresh=a;this.doTooltips();this.url=b;this.template=new Template(c.innerHTML,/(^|.|\r|\n)(\#\s*(\w+)\s*#)/);
this.forAjaxItems=$$("."+d);this.timer={};this.doAjax();},doTooltips:function(){this.messages.each(function(b){var a="."+b.key;this.items=$$(a);var c=$(b.value).innerHTML;$A(this.items).each(function(d){new ToolTip(d,c,{className:"darktip"});}.bind(this));}.bind(this));},doAjax:function(){var a=1000*this.autoRefresh;
this.timer=setInterval(function(){this.doAjaxItems();}.bind(this),a);},doAjaxItems:function(){var b=new Array();var a=0;$A(this.forAjaxItems).each(function(c){b[a++]=c.id;}.bind(this));if(b.length>0){new Ajax.Request(this.url,{method:"post",parameters:{"ids":b.toJSON()},onComplete:function(c){this.onCompleteItems(c.responseText.evalJSON());
}.bindAsEventListener(this)});}},onCompleteItems:function(a){$A(a).each(function(c){var b="";c["closePassword"]="";if(c["error"]!=null){Window.location="/";}else{if(c["archivePassword"]==null||c["archivePassword"]==""||c["archivePassword"]=="empty"){c["closePassword"]="display_none";}b=this.template.evaluate(c);
$(c["id"]).update(b);}}.bind(this));}});var TransactionStatusRefresher=Class.create({initialize:function(c,d,b,a){this.operationId=c;this.timeout=d;this.status=a;this.url=b;this.timer={};this.startTimer();},setInitialText:function(a){if((a=="Purchases Approved"||a=="Subscription")&&$("orderInfoText")){this.setVisibleElement(false,"orderInfoText");
}},startTimer:function(){var a=1000*this.timeout;this.timer=setInterval(function(){this.onTimer();}.bind(this),a);},onTimer:function(){new Ajax.Request(this.url,{method:"post",parameters:{"operationId":this.operationId,"status":this.status},onComplete:function(a){this.onRequest(a.responseText.evalJSON());
}.bindAsEventListener(this)});},onRequest:function(a){if(a["error"]!=null){window.location="/";}else{if(a["status"]!=this.status){this.status=a["status"];this.setInitialText(this.status);if(a["view"]!=null){$(this.operationId).update(a["view"]);}if(a["topText"]!=null){$("topText").update(a["topText"]);
}if(a["bottomText"]!=null){$("bottomText").update(a["bottomText"]);}}if((a["isContinue"]!=null)&&(a["isContinue"]=="false")){clearInterval(this.timer);}}},setVisibleElement:function(b,a){if(b){document.getElementById(a).style.display="block";}else{document.getElementById(a).style.display="none";}}});
var ComplectationList=Class.create({initialize:function(d,h,g,e,f,a,b,c){this.prefixUrl=d;this.prefix=h;this.list=$$("."+g);this.total=(e=="")?e:$(e);this.balance=(f=="")?f:$(f);this.balanceAfter=(a=="")?a:$(a);this.purchaseLink=(b=="")?b:$(b);this.outer=$(c);$A(this.list).each(function(i){i.onclick=function(){this.waitingEffect();
this.remove(i.title);return false;}.bindAsEventListener(this);}.bind(this));},waitingEffect:function(){new Effect.Opacity(this.outer,{from:1,to:0.2,duration:0.2});if(this.loader==null){this.loader=new Element("img",{src:"/images/ajax-loader.gif",style:"position:absolute; top:50%;left:50%; display:block;margin-left:-25px;margin-top:-12px;"});
this.outer.appendChild(this.loader);}this.loader.show();},remove:function(a){new Ajax.Request(this.prefixUrl+a+".html",{onComplete:function(b){this.onRemoveComplete(b.responseText,a);this.endEffect();}.bindAsEventListener(this),onFailure:function(){this.endEffect();}.bindAsEventListener(this)});},onRemoveComplete:function(a,c){if(a.empty()){window.location.reload();
}else{try{var b=a.evalJSON(true);if(this.total){this.total.update(b.total);}if(this.balance){this.balance.update(b.balance);}if(this.balanceAfter){this.balanceAfter.update(b.balanceAfter);}if(this.purchaseLink){this.purchaseLink.href=b.purchaseLink;}}catch(d){}$(this.prefix+c).remove();}},endEffect:function(){this.loader.hide();
new Effect.Opacity(this.outer,{from:0.2,to:1,duration:0.2});}});var PriceTable=Class.create({initialize:function(c,e,f,d,b,a){this.outer=c;if(!$(this.outer)){return;}this.block=$(e);this.popupList=$$("."+d);this.url=b;this.trs=$A($(this.outer).select("tr"));this.trs=this.trs.without(this.trs[0]);this.radios=Form.getInputs($(this.outer),"radio",f);
this.popupListener();this.rowListener();},popupListener:function(){$A(this.popupList).each(function(a){var b="<img src='/images/groupview-loader.gif'/> Loading ...";new ToolTip(a,b,{className:"darktip"},this.url+"?viewId="+a.getAttribute("viewid"));}.bindAsEventListener(this));},rowListener:function(){for(var a=0;
a<this.trs.length;a++){var b=this.trs[a];b.observe("click",function(e){e.select("input")[0].checked=true;var c=$A(this.trs).indexOf(e);var d=0;this.trs.each(function(g){var f="selected-price";if(d==c){$(g).addClassName(f);}else{$(g).removeClassName(f);}d++;});fix_height_for_ie6(this.block);}.bind(this,b));
}},getRadioValue:function(b){try{return b.find(function(c){return c.checked;}).value;}catch(a){}return null;}});function emailChecking(b){var c=/^[\w\-\'\~\_\.\*\/=\^\{\}\?\+\!\#\$\%\&\`\|]+[\@][\w\_\.\-]+[\.][\w]{2,6}$/i;if((b=="")||(b.length>100)||(c.exec(b)==null)||(b.substr(b.lastIndexOf("@")+1,1)==".")){return false;
}var a=b.substring(0,b.indexOf("@"));if((b.indexOf("..")>0)||(a[0]==".")||(a[a.length-1]==".")){return false;}return true;}function onClickPreSubscribe(){try{var a=$("subscribeFormEmail");var b={};b["invalid"]=$("subscribeFormEmailInvalid");b["empty"]=$("subscribeFormEmailEmpty");if(a.value.empty()){b["empty"].style.display="";
b["invalid"].style.display="none";}else{if(emailChecking(a.value)){b["empty"].style.display="none";b["invalid"].style.display="none";$("subscribeForm").submit();}else{b["invalid"].style.display="";b["empty"].style.display="none";}}fix_height_for_ie6("subscribeFormBlock");return false;}catch(c){}}function onClickSubscribe(){try{var d=$("confirmCheckBox");
var c=$("onClickSubscribeSubmit");var b=false;var a='<img src="/images/check.gif" style="margin-top:-1px;"/>';try{d.observe("click",function(e){if(b){b=false;d.innerHTML="";}else{b=true;d.innerHTML=a;d.removeClassName("error_checkbox");}});}catch(f){alert(f);}try{c.onclick=function(){if(b){$("subscribeForm").submit();
return false;}else{d.addClassName("error_checkbox");}};}catch(f){alert(f);}}catch(f){}}function getElementHeight(b){var c=0;var d=b.childNodes;for(var a=0;a<d.length;a++){if(d[a].id!="left"&&d[a].id!="footer"&&d[a].id!="about_us_text"){c=c+d[a].offsetHeight;}}if(navigator.userAgent.indexOf("MSIE")!=-1){if(document.getElementById("flashPlayer-membership")){c=c-22;
}else{c=c-17;}}return c;}function calculateHeight(){if(document.getElementById("main")&&document.getElementById("about_us_text")){document.getElementById("about_us_text").style.display="block";offsetTopAbout=document.getElementById("about_us_text").offsetHeight;mainHeight=getElementHeight(document.getElementById("main"));
document.getElementById("about_us_text").style.top=mainHeight+5+"px";if(navigator.userAgent.indexOf("MSIE")!=-1){document.getElementById("footer").style.marginTop=offsetTopAbout+6+"px";document.getElementById("footer").style.position="absolute";}else{if(navigator.userAgent.indexOf("Chrome")!=-1){document.getElementById("footer").style.marginTop=offsetTopAbout+25+"px";
}else{document.getElementById("footer").style.marginTop=offsetTopAbout+25+"px";}}}}
