var SITEFUNCTION_SCRIPT="1.2"; var nowDateValue=new Date(); var $mousevar={}; _ExtSrcs = "" +"" +"" +""; document.write(_ExtSrcs); var floatWinName="_common_floatwindow_"; document.write(""); var $ActivePopup; var ISIE = document.all?true:false; if (!ISIE) { try { if(window.Event && document.captureEvents) { document.captureEvents(Event.MOUSEMOVE | Event.CLICK ); document.addEventListener("mousemove",get_mouse,true); } }catch(e3){} } function get_mouse(e) { var x,y; x=e.pageX; y=e.pageY; $mousevar["x"]=x; $mousevar["y"]=y; } function fnRetrievePassword(pEmail) { if(pEmail.indexOf("@")>-1) { var localUrl="/a00001/signon.php?_SingonBt1=retreive&t=100&ue="+pEmail; fnPopWin(localUrl); } else alert("Email address is not valid, Please correct and retry. "); } function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i-1) { localParent.childNodes[localLength-1].style.display="block"; pImgObj.src="/images/a0.gif"; } else { localParent.childNodes[localLength-1].style.display="none"; pImgObj.src="/images/a1.gif"; } } function fnMenu(pMenu,pObj) { var localNavCode=getQueryVariable("navcode"); if (localNavCode && localNavCode!="") pMenu=localNavCode; var nowDateValue=new Date(); if (!pObj) pObj="Area_NavMenu"; var lUrl="/m.php?mrefcode="+ pMenu+"&r_path="+encodeURIComponent(window.location.pathname)+"&r_vars="+encodeURIComponent(window.location.search.substring(1)+"&_sysdq="+nowDateValue.getMilliseconds()); rc0(pObj,lUrl); } var TOP_WINE_UID=""; var ACTIVE_AD_MENU_CODE=""; function fnAd(pMenu,pMax,pParam,pObj) { var localNavCode=getQueryVariable("navcode"); if (localNavCode && localNavCode!="") { pMenu=localNavCode; } if (pMenu && pMenu!="") { ACTIVE_AD_MENU_CODE=pMenu; } else { pMenu=ACTIVE_AD_MENU_CODE; } var nowDateValue=new Date(); if (!pObj) pObj="Area_PageAd"; if (!pParam) pParam=""; if (TOP_WINE_UID!="") pParam+="&c="+TOP_WINE_UID; var lquery=window.location.search.substring(1); if (lquery && lquery.indexOf("l=L230684932e0d6f1e92")>-1) { ALL_RATED_WINES=""; } window.status=ALL_RATED_WINES; var lUrl="/a.php?mrefcode="+ pMenu+"&admax="+pMax+"&r_path="+encodeURIComponent(window.location.pathname)+"&rwids="+encodeURIComponent(ALL_RATED_WINES)+"&r_vars="+encodeURIComponent(window.location.search.substring(1)+"&"+pParam+"&_sysdq="+nowDateValue.getMilliseconds()); //var lUrl="/a.php?mrefcode="+ pMenu+"&admax="+pMax+"&r_path="+encodeURIComponent(window.location.pathname)+"&rwids=&r_vars="+encodeURIComponent(window.location.search.substring(1)+"&"+pParam+"&_sysdq="+nowDateValue.getMilliseconds()); //ALL_RATED_WINES=""; //window.status=ALL_RATED_WINES; //setTimeout("fnAdLocation('',20,'"+ALL_RATED_WINES+"');",1000); rc0(pObj,lUrl); //document.getElementById( pObj).innerText=lUrl; } function fnSlot(pObj,pLUID,pSUID, pParam) { var lUrl="/s.php?l="+ pLUID+"&suid="+pSUID+"&"+pParam; rc0(pObj,lUrl); } function fnExecSignUp(pType) { if (!pType || pType==0) { var localUrl="/a00001/signon.php?_SingonBt1=Sign Up"; fnPopWin(localUrl); } else { var formObj=document.getElementById("_common_signon_form"); if (formObj!=undefined) { var autoauthV=formObj.autoauth.value; if (!formObj.autoauth.checked) autoauthV="0"; var localUrl="/a00001/signon.php?_SingonBt1="+formObj._SingonBt1.value+"&usid="+formObj.usid.value+"&autoauth="+autoauthV+"&authcode="+formObj.authcode.value; if (formObj.usid_confirm) localUrl+="&usid_confirm="+formObj.usid_confirm.value; if (formObj.authcode_confirm) localUrl+="&authcode_confirm="+formObj.authcode_confirm.value; fnPopWin(localUrl); } } } function pu(pObj,pForm,pUrl) { var obj1=document.getElementById(pObj); if(obj1 && obj1.innerHTML) { var nowD=new Date(); remoteFormCall(pObj,pUrl,null,pForm,{preText:""}); } } function remoteFormCall(pObj,pURL,pHeaders,pFormName,pParams, isMsg, excBegin) { if (Prototype) { var vFormData=Form.serialize(pFormName,"&","",excBegin); if (isMsg) { var obj1=document.getElementById(pObj); if(obj1 && obj1.innerHTML) obj1.innerHTML="Loading... Please Wait."; } rc(pObj,pURL,pHeaders,vFormData,pParams); } else { window.status="Error: Missing lib, function call failed."; } } function fnExecLogout() { var localUrl="/a00001/signon.php?_SingonBt1=Logout"; fnPopWin(localUrl); } function fnReviewByLetter(pObj,pLetter) { fnResetWineUIDs(); var lUrl="/i.php?l=L10644451bd3723dd64&isadplus=1&letterindex="+ pLetter; if (pLetter=="0") lUrl="/s.php?l=L24496451c76f3e74e0&suid=UID_6554101874c7a9730804bd"; fbProgressIcon( pObj,1); rc0(pObj,lUrl); } function fbProgressIcon(pObj,pMode, pIcon) { if (!pIcon || pIcon=="") pIcon="/a00000/images/icon/progress.gif"; var localIconObj=''; var localObj=document.getElementById(pObj); if (!localObj || localObj==undefined) return; if (pMode==0) localObj.innerHTML=localIconObj; if (pMode==1) localObj.innerHTML=localIconObj+localObj.innerHTML; if (pMode==2) localObj.innerHTML=localObj.innerHTML+localIconObj; } function fnResetReviewSearch(pForm,pObj) { var formObj=document.getElementById(pForm); if (formObj) { formObj.reset(); } fnReviewByLetter('_common_dynarea','0'); } function fnReviewSearch(pForm,pObj) { var lUrl="/i.php?"; var formObj=document.getElementById(pForm); if (formObj) { var localParams="l=L8305451c42b4602b7&isadplus=1"; for (j=0;j-1 && trim(formObj.elements[j].value)!="") { if (lcoalMyLists=="") lcoalMyLists= formObj.elements[j].name.substring(7)+"="+encodeURIComponent(formObj.elements[j].value); else lcoalMyLists+=";"+formObj.elements[j].name.substring(7)+"="+encodeURIComponent(formObj.elements[j].value); } } } rc0r3(pCUID+"_RATING",pCUID,localParams,localClParams,newListName,lcoalMyLists,2); closePopup(); } function trim(str) { return str.replace(/^\s*|\s*$/g,""); } function fnCheckUserList(pID) { var localObj=document.getElementById(pID); if (localObj) { if (!localObj.checked) localObj.checked=true; } } function fnPopWin(pUrl,pWidth,pHeight) { var swinObj=document.getElementById(floatWinName); if (swinObj) { if (pWidth) swinObj.style.width=pWidth; if (pHeight) swinObj.style.height=pHeight; fnPopupWindow(swinObj); rc0(floatWinName,pUrl); } } function closePopup(swinObj) { if (!swinObj) swinObj=document.getElementById(floatWinName); if (swinObj) { $ActivePopup=null; swinObj.style.visibility="hidden"; } } function fnPopupWindow(winElem, e){ if ($ActivePopup) { if ($ActivePopup!=winElem) { closePopup($ActivePopup); $ActivePopup=winElem; } else return; } else $ActivePopup=winElem; var objectWidth = winElem.offsetWidth; var screenWidth = document.body.clientWidth; if (ISIE) { mouseX = event.clientX + document.body.scrollLeft; mouseY = event.clientY + document.body.scrollTop; } else { mouseX=$mousevar["x"]; mouseY=$mousevar["y"]; } if(mouseX + winElem.offsetWidth < screenWidth) { winElem.style.left = mouseX; } else winElem.style.left = screenWidth - objectWidth; winElem.style.top = mouseY-5; winElem.style.visibility="visible"; } function fnUndoUserList(pUid,pUsID) { var selectObj=document.getElementById(pUid+"_RATING_LIST"); if (selectObj && selectObj.value!="0" && selectObj.value!="") { var localListText=selectObj.options[selectObj.selectedIndex].text; var actionType="-1"; if (localListText.indexOf("*")==-1) { if (localListText.indexOf("(0)")>-1 && localListText.indexOf("[My]")>-1) { if (!confirm("Are you sure to delete current list: "+localListText+" ?")) return; actionType="-10"; } else return; } rc0r2(pUid+"_RATING",pUid,selectObj.value,actionType); } } function rc0r3(o,u,v,v1,nl,mlu,t) { if (!t) t=0; return rc(o,"/a00001/rating.php?u="+u+"&l="+v+"&t="+t+"&nl="+nl+"&mlu="+mlu+"&cl="+v1,null,null,{appText:""}); } function rc0r2(o,u,v,t) { if (v=="-1") { var addObj=document.getElementById("SPANNEWCUST_"+u); if (addObj) addObj.style.display="block"; return; } if (!t) t=0; return rc(o,"/a00001/rating.php?u="+u+"&l="+v+"&t="+t,null,null,{appText:""}); } function rc0r1(o,u,v,t) { if (!t) t=0; return rc(o,"/a00001/rating.php?u="+u+"&v="+v+"&t="+t,null,null,{appText:""}); } var ALL_RATED_WINES=""; function fnResetWineUIDs() { ALL_RATED_WINES=""; } function fnAddWineUIDs(u) { if (u && u!="" && ALL_RATED_WINES.indexOf(u)==-1) { if (ALL_RATED_WINES=="") ALL_RATED_WINES=u; else ALL_RATED_WINES+=","+u; } } function fnAdLocation(pNewLoc, pNum, pNotes) { //prompt("/a.php?isretonly=1&rwids="+pNotes+"&adloc="+pNewLoc,"/a.php?isretonly=1&rwids="+pNotes+"&adloc="+pNewLoc); rc("adRetailsDiv","/a.php?isretonly=1&rwids="+pNotes+"&adloc="+pNewLoc,null,null,{appText:""}); } 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 fnStorePreferenceLocation(pNewLoc) { //prompt("/a.php?isretonly=1&rwids="+pNotes+"&adloc="+pNewLoc,"/a.php?isretonly=1&rwids="+pNotes+"&adloc="+pNewLoc); createCookie("User_2nd_location",pNewLoc,365); fbProgressIcon( "storelisttab",1); rc("storelisttab","/s.php?l=L28454932d9b71c6eb&suid=UID_147016207849fe17162dffc&storeprefloc="+pNewLoc,null,null,{appText:""}); } function rc0r(o,u) { fnAddWineUIDs(u); try{setTimeout("rc0rDelegate('"+o+"','"+u+"');",4000);}catch(e1){} } function rc0rDelegate(o,u) { return rc(o,"/a00001/rating.php?u="+u,null,null,{appText:""}); } function rc0rs(o,u) { try{setTimeout("rc0rsDelegate('"+o+"','"+u+"');",2000);}catch(e1){} } function rc0rsDelegate(o,u) { return rc(o,"/a00001/stores.php?u="+u,null,null,{appText:""}); } function fnSwitchDisplay(pObj) { var localObj=document.getElementById( pObj); if (localObj) { if (localObj.style.display!="none") localObj.style.display="none"; else localObj.style.display="block"; } } function fnDeleteUserListItem(pUID,pList,pObj) { return rc(pObj+pUID,"/a00001/rating.php?u="+pUID+"&l="+pList+"&noview=1&t=-1",null,null,{appText:""}); } function fnSingon(pDivObj) { } function newWindow(address) { var win = window.open(address); win.focus(); } function nc0r(u,v) { var localU="/a00001/dataupdate.php?m=rating&p="+u+"!!"+v; //window.open(localU); nc(null,localU,null,null,{appText:""}); } function nc0l(u,v) { var localU="/a00001/dataupdate.php?m=list&p="+u+"!!"+v; nc(null,localU,null,null,{appText:""}); } function rc0(o,u) { return rc(o,u,null,null,{appText:""}); } function nc0(o,u) { return rc(o,u,null,null,{appText:""}); } function nc(o,u,h,q,p) { if ($L) $L.nonQuery(o,u,q,p); else window.status="..."; } function fnRetrievePass() { $uemailObj=document.getElementById("usid"); if ($uemailObj!=undefined) alert($uemailObj.value); } function rc(o,u,h,q,p,f) { if ($L) $L.update(o,u,h,q,p); else window.status="..."; } function fnViewUserCustListExt(pUid,pUsID,pList) { if (!pUid || pUid=="") return; window.open("/i.php?l=L31983452114df6fc8c&c="+pUid+"&u="+ pUsID+"&v="+pList); } function fnViewUserCustList(pUid,pUsID) { if (!pUid || pUid=="") return; var selectObj=document.getElementById(pUid+"_RATING_LIST"); if (!selectObj ||selectObj.value=="" ||selectObj.value=="0") return; window.open("/i.php?l=L31983452114df6fc8c&c="+pUid+"&u="+ pUsID+"&v="+selectObj.value); } function quickSearchByObj(pFormObj,pKwObjNm,pUrl,pParam) { var pKwObj=document.getElementById(pKwObjNm); if (pKwObj) quickSearch(pFormObj,pKwObj.value,pUrl,pParam); } function getQueryString(pURI) { if (!pURI || pURI=="") pURI=document.URL; var idx = pURI.indexOf('?'); if (idx>-1) return pURI.substring(0,idx); return pURI; } function getUriArray(pURI) { if (!pURI || pURI=="") pURI=document.URL; var idx = pURI.indexOf('?'); if (idx>-1) return str2Array(pURI.substring(idx+1, pURI.length),"&","="); return null; } function str2Array(pStr,pSep,pAssign) { if (!pStr|| pStr=="") return null; if (!pAssign) pAssign="="; if (!pSep) pSep="&"; var params = new Array(); var pairs =pStr.split(pSep); if (pStr.indexOf(pSep)==-1) pairs=new Array(pStr); for (var i=0; i document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = xScroll; } else { pageWidth = windowWidth; } return [pageWidth,pageHeight]; } function getViewHeight() { return Math.max( document.documentElement ? Math.max(document.documentElement.scrollHeight||0, document.documentElement.offsetHeight||0) : 0, document.body ? Math.max(document.body.scrollHeight||0, document.body.offsetHeight||0) : 0 ); } function getViewHeight2() { var e = $('_getViewHeight2_work'); if (!e) { e = $(document.createElement("div")); e.setAttribute('id','_getViewHeight2_work'); e.setAttribute('display','none'); document.body.appendChild(e); } e.setStyle({position:'absolute', left:'0px', top:'0px', width:'100%', height:'100%'}); var h = e.getHeight(); return h; } function getViewHeight3() { return document.documentElement.clientHeight && document.compatMode && document.compatMode=="CSS1Compat" ? (navigator.userAgent.indexOf('Opera') > -1 && parseFloat(window.opera.version()) < 9.5 ? document.body.clientHeight : document.documentElement.clientHeight) : document.body.clientHeight; } function getBodyHeight() { return Math.max( document.documentElement ? Math.max(document.documentElement.scrollHeight||0, document.documentElement.offsetHeight||0) : 0, document.body ? Math.max(document.body.scrollHeight||0, document.body.offsetHeight||0) : 0 ); } function fnFBOptions(pNoteID,pSite) { var localURL="/external/mywine/fboptions.php?tuid="+pNoteID+"&tuit="+pSite; closePopup(); fnPopWin(localURL,400,300); } function fnFBAddFavWine(pNoteID,pSite) { var localURL="http://apps.facebook.com/my_wines//fbaddfavwine.php?tuid="+pNoteID+"&tuit="+pSite; top.location.href=localURL; }