
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
function clearFlashDiv(){window.getElementById("flashcontent").style.display="none";}
function gotoLowBandwidth(){window.getElementById("flashcontent").style.display="none";}
function gotoHighBandwidth() {window.location.href = "/sethtml.html?isHtml=&redir=" + escape( window.location.href );}function loadAdwords(URL){var iframe=document.createElement('iframe');iframe.style.height='0px';iframe.style.width='0px';iframe.style.border='0px';document.body.appendChild(iframe);iframe.src=URL;}
function doResize(){if(!isHtml){window.scrollTo(0,0);d=document.getElementById('flashcontent');if(document.documentElement.clientWidth>=996){d.style.width="100%";}else{d.style.width="1000px";}
if(document.documentElement.clientHeight>=587){d.style.height="100%";}else{d.style.height="587px";}}}
function ajaxLoadAdwords(url){$j.get(url);}
function setLocale(){$j("#localeSelector").toggle();}
function showLanguages(){$j.post("/setlocale/show.html",function(data){$j("#localeSelector").html(data);});}
function selectLanguage(lang){$j.post("/setlocale/set.html",{"lang":lang},function(data){$j("#localeSelector").html(data);});}
function selectLocale(lang,cnty){string=String(window.location);uri=string.split('/');page='';for(i=3;i<uri.length;i++){page+='/'+uri[i];}
page=page.split('.');pg=(page[0]=='/')?page[0]:page[0]+'.html';loc='/setlocale.html?language='+lang+'&country='+cnty+'&page='+pg;window.location=loc;}
function popupWindow(id,width,height){this.id=id;this.width=width;this.height=height;this.build=popupWindow_build;this.build=this.build();this.show=popupWindow_show;this.hide=popupWindow_hide;this.destroy=popupWindow_destroy;}
function popupWindow_build(){var frame='<div id="'+(this.id)+'Popup" style="visibility: hidden; position: absolute; z-index: 1001; top:0px; left:0px;" align="center">'
+'<div class="'+(this.id)+'Content" style="position: relative; z-index: 1003; width: '+(this.width)+'px; height: '+(this.height)+'px; top: 15px; left: 15px; background:url(/images/popup/popupGradientBG.jpg);"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'width" style="background: transparent url(/sdata/img/popup/t.png) repeat-x scroll 0px 0px; top: 0px; left: 15px; width: '+(this.width)+'px; height: 15px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'width '+(this.id)+'top" style="background: transparent url(/sdata/img/popup/b.png) repeat-x scroll 0px 0px; top: '+(this.height+15)+'px; left: 15px; width: '+(this.width)+'px; height: 15px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'height" style="background: transparent url(/sdata/img/popup/l.png) repeat-y scroll 0px 0px; top: 15px; left: 0px;  width: 15px; height: '+(this.height)+'px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'left '+(this.id)+'height" style="background: transparent url(/sdata/img/popup/r.png) repeat-y scroll 0px 0px; top: 15px; left: '+(this.width+15)+'px; width: 15px; height: '+(this.height)+'px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'left" style="background: transparent url(/sdata/img/popup/tr.png) no-repeat scroll 0px 0px; top: 0px; left: '+(this.width+15)+'px; width: 15px; height: 15px;"></div>'
+'<div class="'+(this.id)+'Border" style="background: transparent url(/sdata/img/popup/tl.png) no-repeat scroll 0px 0px; top: 0px; left: 0px; width: 15px; height: 15px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'left '+(this.id)+'top" style="background: transparent url(/sdata/img/popup/br.png) no-repeat scroll 0px 0px; top: '+(this.height+15)+'px; left: '+(this.width+15)+'px; width: 15px; height: 15px;"></div>'
+'<div class="'+(this.id)+'Border '+(this.id)+'top" style="background: transparent url(/sdata/img/popup/bl.png) no-repeat scroll 0px 0px; top: '+(this.height+15)+'px; left: 0px; width: 15px; height: 15px;"></div>'
+'</div>';var build=$j("body").append(frame);if(build){return true;}else{return false;}}
function popupWindow_show(){popupWindow_addOverlay(this.id);$j("#"+(this.id)+"Popup").css({"top":(($j(window).height()/2)-(this.height/2)+$j(window).scrollTop()-15),"left":(($j(window).width()/2)-(this.width/2)+$j(window).scrollLeft()-15)});$j('.overlay').css("height",$j(document).height());$j('.overlay').css("width",screen.width);$j('#'+this.id+'Popup').css('visibility','visible');popupWindow_captureResize(this.id,this.width,this.height);}
function popupWindow_addOverlay(id){$j("body").append('<div id="overlay" class="overlay" onclick="'+id+'.hide();"></div>').css({"overflow":"hidden"});$j("html").css({"overflow":"hidden"});$j(".overlay").css({"opacity":"0.6"},"linear");}
function popupWindow_captureResize(id,width,height){window.onresize=function(){if(document.all){window.resizeEnd=(window.resizeEnd==null)?(new Object()):window.resizeEnd;clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(popupWindow_onResizeEnd(id,width,height),1);}
else{popupWindow_onResizeEnd(id,width,height);}}}
function popupWindow_onResizeEnd(id,width,height){$j("#"+(id)+"Popup").css({"top":(($j(window).height()/2)-(height/2)+$j(window).scrollTop()-15),"left":(($j(window).width()/2)-(width/2)+$j(window).scrollLeft()-15)});}
function popupWindow_hide(){$j(window).unbind('resize');$j("#"+(this.id)+"Popup").css("visibility","hidden");$j("."+(this.id)+"Content").html('');popupWindow_removeOverlay();}
function popupWindow_removeOverlay(){$j("body").css({"overflow-y":"visible"});$j(".overlay").remove();}
function popupWindow_destroy(){var destroy=$j("."+this.id+"Popup, ."+this.id+"Content, "+this.id+"Border").remove();if(destroy){return true;}else{return false;}}