
var winobj=window.top;var docobj=winobj.document;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 expires="";document.cookie=name+"="+value+expires+"; path=/";}
function eraseCookie(name)
{createCookie(name,"",-1);}
function getCookie(NameOfCookie)
{if(document.cookie.length>0)
{begin=document.cookie.indexOf(NameOfCookie+"=");if(begin!=-1)
{begin+=NameOfCookie.length+1;end=document.cookie.indexOf(";",begin);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(begin,end));}}
return null;}
function espalert_popup(string,title,permit,height)
{if(!height)height=5;if(!title)title='';if(permit)
{if(getCookie(permit)==permit)return;}
var fwin=window.open('http://www.be2es.com/alert_popup.fpl?permit='+permit+'&title='+escape(title)+'&string='+escape(string),'alert','resizable=no,scrollbars=no,menubar=no,toolbar=no,width=330,height='+height+',top=200,left=200');if(fwin&&fwin.name&&fwin.name=='alert')
{fwin.window.focus();fwin.opener=self;}
else
{alert(title+'\n\n'+string);}
fwin.window.focus();fwin.opener=self;};function italert_popup(string,title,permit,height)
{if(!height)height=5;if(!title)title='';if(permit)
{if(getCookie(permit)==permit)return;}
var fwin=window.open('http://www.be2.it/alert_popup.fpl?permit='+permit+'&title='+escape(title)+'&string='+escape(string),'alert','resizable=no,scrollbars=no,menubar=no,toolbar=no,width=330,height='+height+',top=200,left=200');if(fwin&&fwin.name&&fwin.name=='alert')
{fwin.window.focus();fwin.opener=self;}
else
{alert(title+'\n\n'+string);}
fwin.window.focus();fwin.opener=self;};function alert_popup(string,title,permit,height)
{if(!height)height=5;if(!title)title='';if(permit)
{if(getCookie(permit)==permit)return;}
var fwin=window.open('/lib/alert_popup.jsp?permit='+permit+'&title='+escape(title)+'&string='+escape(string),'alert','resizable=no,scrollbars=no,menubar=no,toolbar=no,width=330,height='+height+',top=200,left=200');if(fwin&&fwin.name&&fwin.name=='alert')
{fwin.window.focus();fwin.opener=self;}
else
{alert(title+'\n\n'+string);}
fwin.window.focus();fwin.opener=self;};function windowResize(newWidth,newHeight)
{if(newHeight>500)
newHeight=500;if((self.outerHeight)&&(self.innerWidth))
{var h_border=self.outerHeight-self.innerHeight;var v_border=self.outerWidth-self.innerWidth;window.resizeTo(newWidth+v_border+50,newHeight+h_border+150);window.resizeTo(newWidth+v_border,newHeight+h_border);}else{window.resizeTo(newWidth,newHeight);var a=newHeight-document.body.clientHeight;var b=newWidth-document.body.clientWidth;window.resizeTo(newWidth+b,newHeight+a);}}
function openProfileWindow(host,seen,referer,popup,sessionid,width,id,position,last,mail,mailid)
{if(popup=='true'){var win=window.open(host+'/page/member/userview.xml?sessionid='+sessionid+'&position='+position+'&last='+last+'&id='+id+'&mail='+mail+'&mailid='+mailid+'&referer='+referer,'profilWindow_'+id,'resizable=no,scrollbars=no,menubar=no,toolbar=no,width='+width+',height=520,top=50,left=106');win.window.focus();}
else{self.document.location=host+'/page/member/userview.xml?sessionid='+sessionid+'&position='+position+'&last='+last+'&id='+id+'&mail='+mail+'&mailid='+mailid+'&referer='+referer+'&seen='+seen;}}
function openAgbWindow(host,sessionid,width,filiale,version)
{var win;if(version<3){win=window.open(host+'/page/agbs/static.xml?page=agbs_fil'+filiale+'_vers'+version,'agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');}
else{win=window.open(host+'/page/agbs/xsl/agbs_fil'+filiale+'_vers'+version+'.html','agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');}
win.window.focus();}
function openV2AgbWindow(host,sessionid,width,version)
{var win;win=window.open(host+'?tcv='+version,'agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');win.window.focus();}
function openPrivacyWindow(host,sessionid,width,filiale,version)
{var win;if(version<3){win=window.open(host+'/page/agbs/static.xml?page=agbs_fil'+filiale+'_vers'+version+'#privacy','agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');}
else{win=window.open(host+'/page/agbs/xsl/agbs_fil'+filiale+'_vers'+version+'.html#privacy','agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');}
win.window.focus();}
function openV2PrivacyWindow(host,sessionid,width,filiale,version)
{var win=window.open(host+'#privacy','agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');win.window.focus();}
function openHelpWindow(sessionid,width)
{var win=window.open('/page/guest/static.xml?page=faq&sessionid='+sessionid,'agbWindow','resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width='+width+',height=460,top=50,left=106');win.window.focus();}
function openMailWindow(sessionid,width,mailid,popup)
{if(popup=='true'){var win=window.open('/page/member/mailread.xml?sessionid='+sessionid+'&id='+mailid,'mailWindow_'+mailid,'resizable=no,scrollbars=yes,menubar=no,toolbar=no,width='+width+',height=400,top=100,left=200');win.window.focus();}
else{self.document.location='/page/member/mailread.xml?sessionid='+sessionid+'&id='+mailid;}}
function winResize(){var panel=docobj.getElementById("info_panel");if(docobj.getElementById("info_panel")!=null){var topNum=0;var leftNum=0;var bodyHeight=docobj.body.offsetHeight+2*docobj.body.scrollTop;if(!docobj.all){bodyHeight=winobj.innerHeight;}
topNum=(bodyHeight-panel.clientHeight)/2;leftNum=(parseInt(docobj.body.clientWidth)-panel.clientWidth)/2;if(leftNum<0)leftNum=0;if(topNum<0)topNum=0;panel.style.left=leftNum+"px";panel.style.top=topNum+"px";}}
function closePageCenterPopup(){docobj.body.style.overflow='auto';docobj.body.removeChild(docobj.getElementById('info_panel_div'));docobj.body.removeChild(docobj.getElementById('info_panel'));if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("MSIE 7")==-1){var selectInputs=docobj.getElementsByTagName("select");for(var i=0;i<selectInputs.length;++i){selectInputs[i].style.visibility="visible";}}}
function openPageCenterPopup(content){winobj.onresize=winResize;if(docobj.getElementById("info_panel_div")==null){if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("MSIE 7")==-1){var selectInputs=docobj.getElementsByTagName("select");for(var i=0;i<selectInputs.length;++i){selectInputs[i].style.visibility="hidden";}}
docobj.body.style.overflow="hidden";var panelDiv=docobj.createElement("div");panelDiv.id="info_panel_div";var panel=docobj.createElement("div");panel.id="info_panel";panelDiv.className="panel_div";panelDiv.style.width=screen.width+"px";if(!docobj.all){panelDiv.style.height=docobj.body.clientHeight+"px";}
else{if(docobj.body.scrollHeight>screen.height){panelDiv.style.height=docobj.body.scrollHeight+"px";}
else{panelDiv.style.height=screen.height+"px";}}
panel.className="product_panel";panel.innerHTML+=content;panel.style.left="0px";panel.style.top="0px";panel.style.visibility="hidden";docobj.body.appendChild(panelDiv);docobj.body.appendChild(panel);var topNum=0;var leftNum=0;var bodyHeight=docobj.body.offsetHeight+2*docobj.body.scrollTop;if(!docobj.all){bodyHeight=winobj.innerHeight;}
topNum=(bodyHeight-panel.clientHeight)/2;leftNum=(parseInt(docobj.body.clientWidth)-panel.clientWidth)/2;if(leftNum<0)leftNum=0;if(topNum<0)topNum=0;panel.style.left=leftNum+"px";panel.style.top=topNum+"px";panel.style.visibility="visible";}}
function openInfoPanelWindow(contactFormLocation,content,title){var popupContent="";popupContent+='  <div class="box_title" style="width:100%;height:30%;background:#CD0004;">'+'<table border=0 cellpadding=0 cellspacing=0 width="100%">';popupContent+='     <tr style="color: rgb(255, 255, 255);"><td align="center">'+title+'</td><td style="width:15px;"><img src="/images/close_cross.gif" align = "right" onmousedown="javascript:closePageCenterPopup();window.location.href=\''+contactFormLocation+'\';"/></td></tr>';popupContent+='  </table></div>';popupContent+='  <div style="width:100%">'+content+'</div>';openPageCenterPopup(popupContent);}
function openNewMailWindow(sessionid,width,userid,popup)
{if(popup=='true'){var win=window.open('/page/member/userview_emailform.xml?sessionid='+sessionid+'&id='+userid,'newMailWindow_'+userid,'resizable=no,scrollbars=yes,menubar=no,toolbar=no,width='+width+',height=400,top=100,left=200');win.window.focus();}
else{self.document.location='/page/member/userview_emailform.xml?sessionid='+sessionid+'&id='+userid;}}
function openStdPopup(url,width)
{var win=window.open(url,'popup','resizable=no,scrollbars=yes,menubar=no,toolbar=no,width='+width+',height=400,top=100,left=200');win.window.focus();}
function openPopup(url,width)
{openPopupWindow(url,width,180);}
function openPopupWindow(url,width,height)
{var win=window.open(url,'popup','resizable=no,scrollbars=yes,menubar=no,toolbar=no,width='+width+',height='+height+',top=100,left=200');win.window.focus();}
function setPassive(nodeid){document.getElementById(nodeid).style.color='#999999';window.status=' ';return true;}
function setActive(nodeid,name){document.getElementById(nodeid).style.color='#931A1F';window.status=name;return true;}
function submitfunction()
{return true;}
function submitOnEnter(evt)
{var keyCode=document.layers?evt.which:document.all?evt.keyCode:evt.keyCode;if(keyCode!=13)
return true;else{if(submitfunction()==true)doSubmit();return false;}}
function tabOnEnter(field,evt)
{var keyCode=document.layers?evt.which:document.all?evt.keyCode:evt.keyCode;if(keyCode!=13)
return true;else{getNextElement(field).focus();getNextElement(field).select();return false;}}
function getNextElement(field)
{var fieldFound=false;var form=field.form;for(var e=0;e<form.elements.length;e++)
{if(fieldFound&&form.elements[e].type!='hidden')break;if(field==form.elements[e])
fieldFound=true;}
return form.elements[e%form.elements.length];}
function openWindow(url,title)
{var win;win=window.open(url,title,'resizable=yes,menubar=no,scrollbars=yes,toolbar=no,width=400,height=500,top=50,left=100');win.window.focus();}
function openBigWindow(url)
{var win;win=window.open(url,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=920 ,height=594');win.window.focus();}
var clickBlock=false;function setClickBlock(){if(!checkSymbols()){return false;}
if(clickBlock==false){clickBlock=true;return true;}else{return false;}}
function resetClickBlock(){clickBlock=false;}
function checkSymbols(){var isValidHeight=false;var isValidAge=false;var quick_search_result=document.getElementById("quickSearchResult");quick_search_result.style.display="none";var height_range_error_div=document.getElementById("height_range_error_div");var age_range_error_div=document.getElementById("age_range_error_div");var height_from_feet=document.getElementById("height_from_feet");var height_from_inches=document.getElementById("height_from_inches");var height_to_feet=document.getElementById("height_to_feet");var height_to_inches=document.getElementById("height_to_inches");var height_from=document.getElementById("height_from");var height_to=document.getElementById("height_to");var age_from=document.getElementById("age_from").value;var age_to=document.getElementById("age_to").value;if(height_from_feet!=null){if(isNaN(height_from_feet.value)||isNaN(height_from_inches.value)||isNaN(height_to_feet.value)||isNaN(height_to_inches.value)){height_range_error_div.style.display="block";isValidHeight=false;}
else if(!checkHeightInFeet(height_from_feet.value,height_from_inches.value,height_to_feet.value,height_to_inches.value)){height_range_error_div.style.display="block";isValidHeight=false;}
else{height_range_error_div.style.display="none";isValidHeight=true;}
if(!checkAgeRange(age_from,age_to)){age_range_error_div.style.display="block";isValidAge=false;}
else{age_range_error_div.style.display="none";isValidAge=true;}}
else{if(isNaN(height_from.value)||isNaN(height_to.value)){height_range_error_div.style.display="block";isValidHeight=false;}
else if(!checkHeightInCm(height_from.value,height_to.value)){height_range_error_div.style.display="block";isValidHeight=false;}
else{height_range_error_div.style.display="none";isValidHeight=true;}
if(!checkAgeRange(age_from,age_to)){age_range_error_div.style.display="block";isValidAge=false;}
else{age_range_error_div.style.display="none";isValidAge=true;}}
return((isValidAge&&isValidHeight)?true:false);}
function isNumb(keycode){var quick_search_result=document.getElementById("quickSearchResult");quick_search_result.style.display="none";var height_range_error_div=document.getElementById("height_range_error_div");if((keycode>=48&&keycode<=57)||keycode==8||keycode==46||keycode==9||keycode==37||keycode==39||keycode==16||(keycode>=37&&keycode<=40)||(keycode>=96&&keycode<=105)||keycode==13){height_range_error_div.style.display="none";return true;}
else{height_range_error_div.style.display="block";return false;}}
function checkAgeRange(min,max){return!(min>max)}
function checkHeightInFeet(minFeet,minInches,maxFeet,maxInches){if(minFeet>=4&&maxFeet<=7&&minInches>=0&&minInches<12&&maxInches>=0&&maxInches<12&&minFeet<=maxFeet){if(minFeet==maxFeet&&Number(minInches)>Number(maxInches)){return false;}else{return true;}}
return false;}
function checkHeightInCm(min,max){if(min>124&&max<231&&min<=max){return true;}
return false;}