var debugLevel=3;var isInteractive=true;var callMap=new Object();var currentRequestId=null;var isRequestInProgress=false;var prerequestDivId="";var divwidth="";var divheight="";var pageParam=new Array();var secureRequestDivId="";var extrnparams=new Array();function preSubmitForGoogle(B,C){var A=new Array();A.hl="en";A.q="india";A.meta="";return A}function afterResponseForGoogle(C,A,B){hello1();hello2()}function doRequest(requestDivId,callerObj,parameters){if(callerObj=="LoginForm_link"||callerObj=="sellerLoginLink"){secureRequestDivId=""}debug("doRequest :["+requestDivId+"]: "+isRequestInProgress,1);if(isRequestInProgress){alert("Request is in Progress. Wait...");return }var headers=getRequestHeaders(requestDivId);pageParam=headers;currentRequestId=requestDivId;if(headers["preRequestId:errorFlag"]&&headers["preRequestId:errorFlag"]=="Y"){prerequestDivId="response:"+requestDivId}if(headers.isSecure&&headers.isSecure=="Y"){secureRequestDivId=requestDivId;extrnparams=new Array();if(parameters&&typeof parameters=="object"){for(var pname in parameters){extrnparams[pname]=parameters[pname]}}if(headers.loginFormId){doRequest(headers.loginFormId,callerObj,"")}}var url=headers.url;isRequestInProgress=true;debug("ajax request : ["+url+"]",1);responseReady=headers.status;var targetDivId="response:"+requestDivId;var isOkToCall=true;var isRender=true;var isCacheable=(headers.isCacheable&&headers.isCacheable=="Y");if(responseReady){if(responseReady=="S"){debug("Request Sent.Waiting for the Response...",3);isOkToCall=false;isRender=false}else{if(isCacheable&&responseReady=="R"){debug("Response already available.",2);isOkToCall=false;isRender=true}}}if(isOkToCall){debug("ajax request : ["+url+"] 1");removeDiv("responses",targetDivId);requestParams=getRequestParameters(requestDivId);preSubmitCall=headers.beforerequest;if(preSubmitCall&&preSubmitCall.length>0){try{debug("before presubmit function "+preSubmitCall,2);var preFunc=eval(preSubmitCall)}catch(e){alert("Presubmit function ["+preSubmitCall+"] not defined");isRequestInProgress=false;return false}var retVal=preFunc(requestDivId,requestParams,prerequestDivId);if(typeof retVal=="boolean"&&retVal==false){isRequestInProgress=false;return false}else{if(typeof retVal=="object"){for(var pname in retVal){requestParams[pname]=retVal[pname]}}}}if(extrnparams&&typeof extrnparams=="object"){for(var pname in extrnparams){requestParams[pname]=extrnparams[pname]}}if(parameters&&typeof parameters=="object"){for(var pname in parameters){requestParams[pname]=parameters[pname]}}var method=headers.method;if(!method||method==""){method="GET"}var responseText=sendServerRequest(method,url,requestParams,requestDivId,targetDivId,callerObj)}else{if(isRender){closeAllDivs(targetDivId);showDiv(targetDivId);currentRequestId=null;isRequestInProgress=false}}}function sendServerRequest(H,D,F,E,B,A){changeStatus(E,"S");var C=createRequestObject();if(isInteractive){showProgress(E)}var G=toQueryString(F);C.open(H,D+"?"+G,true);C.onreadystatechange=function(){onServerResponse(C,E,B,A)};debug(D+"?"+G,2);C.setRequestHeader("Content-Type","application/x-www-form-urlencoded");C.send(G)}function toQueryString(C){var B="";if(!C){return B}for(var A in C){B=B+""+A+"="+C[A]+"&"}if(B.length>0){B=B.substring(0,B.length-1)}return B}function onServerResponse(http,requestDivId,targetDivId,callerObj){var newdiv=null;if(http.readyState==4){hideProgress(requestDivId);debug("onServerResponse RequestDiv ["+requestDivId+"] TargetDiv ["+targetDivId+"]",1);if(http.status==200){currentRequestId=null;isRequestInProgress=false;changeStatus(requestDivId,"R");var response=http.responseText;var responseDisplayType=getHeader(requestDivId,"responseDisplayType");if(responseDisplayType=="popup"){newdiv=addDiv("responses",targetDivId,response);closeAllDivs(targetDivId);renderDiv(requestDivId,targetDivId,callerObj)}else{if(responseDisplayType=="inline"){var onResponseCallback=getHeader(requestDivId,"afterresponse");if(onResponseCallback&&onResponseCallback.length>0){var onResponsCustomFunc=eval(onResponseCallback);onResponsCustomFunc(requestDivId,targetDivId,response)}}}}else{changeStatus(requestDivId,"N");alert("Error in Server Call ["+http.status+"]")}}if(newdiv){var x="";x=newdiv.getElementsByTagName("script");if(x){var script="";for(var i=0;i<x.length;i++){script=x[i].text}eval(script)}}}function refreshRequestDiv(B){var E=parseError(B);var C="";var A="";var D="";if(E.refreshrequestid!=null&&E.refreshrequestid=="Yes"){if((E.divid)){C=(E.divid)}else{alert("No divId specified");return false}if((E.url)){A=(E.url)}else{alert("No url specified")}if((E.params)){D=(E.params)}if(trim(E.divid)&&E.url){doRequestAsync(C,A,D,null,null,true)}}}function parseError(B){frameStatusPos=B.indexOf("::");var H=B.substring(frameStatusPos+2,B.length);var E=new Array();var C=0;while(H.indexOf("$")>-1){var F=H.indexOf("$");E[C]=H.substring(0,F);H=H.substring(F+1,H.length);C++}if(H.length>0&&H.indexOf("$")==-1){E[C]=H.substring(0,H.length)}var I=new Array();for(C=0;C<E.length;C++){var D=E[C].indexOf(":");var G=E[C].substring(0,D);var A=E[C].substring(D+1,E[C].length);I[G.toLowerCase()]=trim(A)}return I}function createErrorDivs(C,A){if(C.error!=null){if(trim(C.error)){var B="";var D="";if(C.error.indexOf(":")>-1){createErrorDiv("framework:error","Sorry,There are errors!!!",A);return C.error}else{createErrorDiv("framework:error",C.error,A)}}else{createErrorDiv("framework:error","No Error message specified",A)}}if(C.info!=null){if(trim(C.info)){createInfoDiv("framework:info",C.info,A)}else{createInfoDiv("framework:info","No Information message specified",A)}}if(C.warn!=null){if(trim(C.warn)){createWarnDiv("framework:warn",C.warn,A)}else{createWarnDiv("framework:warn","No Warning message specified",A)}}}function createErrorDiv(C,B,A){var D=document.createElement("div");D.setAttribute("id",C+":"+A);parentDivObj=document.getElementById("error:message:"+A);parentDivObj.appendChild(D);newDivObj=document.getElementById(C+":"+A);newDivObj.innerHTML=B;newDivObj.style.color="red"}function createInfoDiv(C,B,A){var D=document.createElement("div");D.setAttribute("id",C+":"+A);parentDivObj=document.getElementById("error:message:"+A);parentDivObj.appendChild(D);newDivObj=document.getElementById(C+":"+A);newDivObj.innerHTML=B;newDivObj.style.color="green";newDivObj.style.marginTop="20px";newDivObj.style.marginleft="50px";newDivObj.style.border="1px solid black"}function createWarnDiv(C,B,A){var D=document.createElement("div");D.setAttribute("id",C+":"+A);parentDivObj=document.getElementById("error:message:"+A);parentDivObj.appendChild(D);newDivObj=document.getElementById(C+":"+A);newDivObj.innerHTML=B;newDivObj.style.color="yellow";newDivObj.style.marginTop="20px";newDivObj.style.marginleft="50px";newDivObj.style.border="1px solid black"}function findPos(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return[B,curtop]}function renderDiv(F,D,C){var B=getHeader(F,"posx");var G=getHeader(F,"posy");displayDivAtObject(C,B,G,D);var E=getHeader(F,"width");var A=getHeader(F,"height");resizeDiv(D,E,A);showDiv(D)}function debug(A,B){if(B&&B>=debugLevel){alert(B+" : "+A)}}function closeAllDivs(B){var D=document.getElementsByTagName("div");for(var C=0;C<D.length;C++){var A=D[C];var E=A.getAttribute("id");if(B&&E&&E!=B&&E.indexOf("response:")==0){hideDiv(E)}}}function getRequestHeaders(B){var A=new Array();requestDivObj=document.getElementById(B);if(requestDivObj){var C=requestDivObj.getElementsByTagName("INPUT");for(i=0;i<C.length;i++){param=C[i];if(param&&param.getAttribute("TYPE")&&param.getAttribute("TYPE")=="hidden"){ptype=param.getAttribute("ptype");if(ptype&&ptype.length>0&&ptype=="header"){A[param.getAttribute("name")]=param.getAttribute("value")}}}}return A}function getFormParameters(A){var B=new Array();requestDivObj=document.getElementById(A);debug("form :"+requestDivObj,1);if(requestDivObj){var G=requestDivObj.getElementsByTagName("INPUT");for(i=0;G&&i<G.length;i++){param=G[i];var F=param.name;var C=param.value;if(F&&C){B[F]=C}}var E=requestDivObj.getElementsByTagName("TEXTAREA");for(i=0;E&&i<E.length;i++){param=E[i];var F=param.name;var C=param.value;if(F&&C){B[F]=C}}var D=requestDivObj.getElementsByTagName("SELECT");for(i=0;D&&i<D.length;i++){param=D[i];var F=param.name;var C=param.value;if(F&&C){B[F]=C}}}return B}function getRequestParameters(B){var A=new Array();requestDivObj=document.getElementById(B);if(requestDivObj){var C=requestDivObj.getElementsByTagName("INPUT");for(i=0;i<C.length;i++){param=C[i];if(param&&param.getAttribute("TYPE")&&param.getAttribute("TYPE")=="hidden"){ptype=param.getAttribute("ptype");if(ptype&&ptype.length>0&&ptype=="param"){A[param.getAttribute("name")]=param.getAttribute("value")}}}}return A}function changeStatus(B,A){requestDivObj=document.getElementById(B);if(requestDivObj){var C=requestDivObj.getElementsByTagName("INPUT");for(i=0;i<C.length;i++){param=C[i];if(param&&param.getAttribute("TYPE")&&param.getAttribute("TYPE")=="hidden"){ptype=param.getAttribute("ptype");if(ptype&&ptype.length>0&&ptype=="header"&&param.getAttribute("name")=="status"){param.setAttribute("value",A);break}}}}}function getHeader(B,D){requestDivObj=document.getElementById(B);if(requestDivObj){var C=requestDivObj.getElementsByTagName("INPUT");for(i=0;i<C.length;i++){param=C[i];if(param&&param.getAttribute("TYPE")&&param.getAttribute("TYPE")=="hidden"){ptype=param.getAttribute("ptype");if(ptype&&ptype.length>0&&ptype=="header"&&param.getAttribute("name")==D){var A=param.getAttribute("value");return A}}}}}function createRequestObject(){var A;try{A=new XMLHttpRequest()}catch(B){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){alert("Your browser is not IE 5 or higher, or Firefox or Safari or Opera")}}}return A}function doRequestAsync(K,C,E,H,G,L){var F=document.getElementById(K);debug("doRequestAsync ["+K+"]--"+F,1);if(F){var J=new Array();if(E){J=E}if(H&&typeof (H)=="function"){var I=H();for(var D in I){J[D]=I[D]}}var A="POST";if(L){showProgress()}var M=createRequestObject();M.open(A,C,true);var B=toQueryString(J);M.setRequestHeader("Content-Type","application/x-www-form-urlencoded");M.send(B);M.onreadystatechange=function(){if(M.readyState==4){if(M.status==200){if(G&&G=="function"){G(M.responseText)}if(F){F.innerHTML=M.responseText}}}}}}function refresh(A){isInteractive=false;changeStatus(A,"N");doRequest(A)}function refreshAsync(A){isInteractive=false;changeStatus(A,"N");doRequest(A)}function resizeDiv(B,C,A){debug("resizeDiv : "+B+" "+C+","+A,1);var D=document.getElementById(B);if(D&&C&&A){D.style.width=parseInt(C)+"px";D.style.height=parseInt(A)+"px"}}function moveDiv(B,A,D){debug("moveDiv : "+B+" "+A+","+D,1);var C=document.getElementById(B);if(C){C.style.left=parseInt(A)+"px";C.style.top=parseInt(D)+"px"}}function showDiv(A){var B=document.getElementById(A);if(B){B.style.visibility="visible";B.style.display="block"}}function onClickHandler(A){return false}function onMouseoverHandler(A){return false}function onMouseoutHandler(A){return false}function onMousedownHandler(A){return false}function onMouseupHandler(A){return false}function closeDiv(A){hideDiv(A)}function hideDiv(A){var B=document.getElementById(A);if(B){B.style.visibility="hidden";B.style.display="none"}}function addDiv(A,B,E){var F=document.getElementById(A);if(F){var D=document.createElement("div");D.setAttribute("id",B);if(extrnparams&&!extrnparams.showText){extrnparams.showText="nothing"}if(extrnparams==null){extrnparams=new Array();extrnparams.showText="nothing"}F.appendChild(D);var C=document.getElementById(B);divwidth=pageParam.width;divheight=pageParam.height;divclass=pageParam["class"];D.innerHTML="<div style='width:"+divwidth+";'><div id='FavoriteLogin'> <div class='DivBox'><table class='ShowHideTable' border='0' cellspacing='0' cellpadding='0'><tr><th><span class='Leftside'>"+pageParam.popupTitle+"</span><span class='RightSide'><a href='#' accesskey='' onClick='closeAllDivs("+A+");return false'><img src='"+contextPath+"/naaptolImages/BtClose.gif' alt='Close' border='0'></a> </span></th></tr><tr><td class='BackgroundBg'><div id='error:message:"+B+"' style='vertical-align:middle;text-align:center;color: #FF0000;font-size: 10px; word-spacing:0px;'>&nbsp;</div><div style='height:"+divheight+";overflow:auto;'>"+E+"</div></td></tr><tfoot><tr><td><img src='"+contextPath+"/naaptolImages/ShowHideTableTfoot.gif' width='274'></td></tr></tfoot></table></div></div></div>";C.className="framediv";return D}}function clearDiv(B){var A=document.getElementById(B);A.innerHTML=""}function removeDiv(A,B){var D=document.getElementById(A);if(D){var C=document.getElementById(B);if(C){D.removeChild(C)}}}function showProgress(A){moveDiv("ajax:ProgressBar","10","15");showDiv("ajax:ProgressBar");timeoutId=window.setTimeout(hideProgress,10000,A)}showProgress.timeoutId=null;function hideProgress(A){window.clearTimeout(showProgress.timeoutId);showProgress.timeoutId=null;hideDiv("ajax:ProgressBar");isRequestInProgress=false}function addEvent(E,D,C,A){var B=false;if(E!=null){if(E.addEventListener){E.addEventListener(D,C,A);B=true}else{if(E.attachEvent){E.attachEvent(D,C);B=true}}}return B}function doHouseKeeping(){}doHouseKeeping.lastTime=-1;doHouseKeeping.count=0;function displayDivAtObject(P,O,V,I){if(document.getElementById(P)){var U=getRealLeft(P)}else{var U=10}if(document.getElementById(P)){var S=getRealTop(P)}else{var S=10}var N=document.getElementById(I);var T=parseInt(pageParam.width);var R=parseInt(pageParam.height);var L=document.all&&!document.getElementById;var J=document.all&&document.getElementById;var X=!document.all&&document.getElementById;var Y=document.layers;var B=screen.width;var a=screen.height;var E=0;var D=0;var C=0;var A=0;var W=0;var Q=0;var M=(L||J)?self.document.body.scrollLeft:self.pageXOffset;var K=(L||J)?self.document.body.scrollTop:self.pageYOffset;var F=0;if(L){E=U;D=S}if(J){E=U+self.document.body.scrollLeft;D=S+self.document.body.scrollTop}if(L||J){W=self.document.body.clientWidth;Q=self.document.body.clientHeight}if(Y){W=self.innerWidth;Q=self.innerHeight;E=U;D=S}if(X){W=self.outerWidth;Q=self.outerHeight;E=U;D=S}var H=((Q+K)-(S+R));if((S+R)>(Q+K)||(R<=300&&H>0&&H<=75)){if(R>200){A=(S)-(R+(R/3))}else{A=(S)-(R*2)-(R/6)}if((U+T)<(Q+M)){C=U+30}else{C=U-T/2}}else{A=(S)+15;if((U+T)<(Q+M)){C=U+30}else{C=U-T/2}}var Z=navigator.appName;var G=navigator.appVersion;if(Z.match("Microsoft Internet Explorer")){C=C-120}if(N!=null){N.style.left=C;N.style.top=A;N.style.display="block";N.style.visibility="visible"}}function getRealLeft(A){xPos=document.getElementById(A).offsetLeft;tempEl=document.getElementById(A).offsetParent;while(tempEl!=null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent}return xPos}function getRealTop(A){yPos=document.getElementById(A).offsetTop;tempEl=document.getElementById(A).offsetParent;while(tempEl!=null){yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent}return yPos}function isUserLoggedIn(){}validateforgotPasswordSubmit=function(){var A=getFormParameters("ForgotP");var B=A.forgotPasswordloginId;if(B!=null&&B.length==0){alert("Please enter login id");isRequestInProgress=false;return false}return A};validateuserSignUpSubmit=function(){var C=getFormParameters("UserSignUp_Form");var D=C.userSignUploginId;if(D!=null&&D.length==0){alert("Please enter login id");return false}var B=C.userSignUppassword;if(B!=null&&B.length==0){alert("Please enter password");return false}var A=C.userSignUprepassword;if(A!=null&&A.length==0){alert("Please enter Re-password");isRequestInProgress=false;return false}return C};validateLoginSubmit=function(E,D,A){clearDiv("error:message:"+A);var C=document.getElementById("error:message:"+A);var F=getFormParameters("SignInForm");if(!isFieldBlank(F.loginId,C,"Please Enter EmailId.","loginId")){return false}if(!isEmailIdValid(F.loginId,C,"Please Enter Valid EmailId.","loginId")){return false}if(!isFieldBlank(F.password,C,"Please Enter Password.","password")){return false}var B=document.getElementById("rememberChkBox");if(B.checked==true){set_Cookies()}return F};validateUserRevLoginSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("userReviewSignInForm");if(!isFieldBlank(E.ur_emailid,B,"Please Enter EmailId.","ur_emailid")){return false}if(!isEmailIdValid(E.ur_emailid,B,"Please Enter Valid EmailId.","ur_emailid")){return false}if(!isFieldBlank(E.ur_password,B,"Please Enter Password.","ur_password")){return false}return E};validateSMSFormSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("SMSForm");if(E.emailId==null&&E.mobNo==null){B.innerHTML="Please Enter Your Mobile Number or Email-Id";return false}if(E.mobNo!=null){if(!isMobileNoValid(E.mobNo,B,"Please enter a valid mobile number (atleast 10 Numbers).","mobNo")){return false}if(!checkMobileNo(E.mobNo,B,"Please enter a valid mobile number.","mobNo")){return false}}if(E.emailId!=null){if(!isEmailIdValid(E.emailId,B,"Please Enter Valid EmailId.","emailId")){return false}}document.getElementById("submitSMS").disabled=true;B.innerHTML='<img src="'+contextPath+'/images/loading.gif" /> <span style="font-family: Tahoma; font-size: 13px; color: #2D96E7; font-weight: bold;">Requesting content...</span>';return E};validateSellProductSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("sellProductForm");if(E.sellPrice==null){B.innerHTML="Please enter Price to sell Product";document.getElementById("sellPrice").focus();return false}if(E.sellNote==null){B.innerHTML="Please enter note about your Product.";document.getElementById("sellNote").focus();return false}if(E.sellerStatus=="Online"){if(E.sellUrl==null){B.innerHTML="Please Enter URL to sell Product.";document.getElementById("sellUrl").focus();return false}}return E};handleSMSFormResponse=function(C,A,B){if(B.match("success")){document.getElementById("error:message:response:request:SMSForm").innerHTML="SMS/Email has been sent successfully";window.setTimeout("closeAllDivs('nodiv')",2000)}};handleIsLoginCheckResponse=function(L,C,H){var F="";var I="";var A="";if(H.indexOf("+")>-1){F=H.substring(0,H.indexOf("+"));A=H.substring(H.indexOf("+")+1)}else{F=H}if(H.match("SellerLogIn")){F=""}if((trim(A)=="submitUsrRev")||(trim(A)=="submitUsrSellerRev")){if(trim(F)=="null"||trim(F)==""){var K=new Array();if(trim(A)=="submitUsrRev"){doRequest("request:userReview",trim(A),K)}else{if(trim(A)=="submitUsrSellerRev"){doRequest("request:userSellerReview",trim(A),K)}}}else{if(secureRequestDivId=="request:userReview"||trim(A)=="submitUsrRev"){submitUserReviewData(trim(F))}else{if(secureRequestDivId=="request:userSellerReview"||trim(A)=="submitUsrSellerRev"){submitUserSellerReviewData(trim(F))}}secureRequestDivId=null}extrnparams=null}else{if(H.match("userReviewLink")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:userProfileOfOtherUser",trim(A),K)}else{var B=trim(A).substring(0,trim(A).indexOf("@"));showAnotherUserProfile(B)}}else{if(H.match("userProfLink")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:userProfileOfOtherUser",trim(A),K)}else{var B=trim(A).substring(0,trim(A).indexOf("@"));showAnotherUserProfile(B)}}else{if(H.match("SellerLogIn")){if(H.indexOf("+")>-1){I=H.substring(0,H.indexOf("+"));A=H.substring(H.indexOf("+")+1)}doRequest("request:SellerLogOutForm",trim(A))}else{if(H.match("msOrderNowUser")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:checkUserForOrderNowForm",trim(A),K)}else{var G=trim(A);var J=G.indexOf("-");var E=G.substring(J+1,G.length);openOrderNowPage(E)}}else{if(H.match("subscribeToListId")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:subscribeToListLoginCheck",trim(A),K)}else{var G=trim(A);var D=trim(A).substring(0,trim(A).indexOf("@"));var K=new Array();K.submitDivId=A;K.listId=D;makeMyRequest(path+"/faces/jsp/commonForMakeRequest.jsp","listId="+D+"&sessionUserId="+trim(F)+"&pageId=checkIsUserSubscribed","checkIsUserSubscribed")}}else{if(H.match("invitefriends")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:inviteFriendsLoginCheck",trim(A),K)}else{window.location=path+"/faces/contactImporter/contactsImporter.jsp"}}else{if(H.match("logintoconnect")){if(trim(F)=="null"||trim(F)==""){var K=new Array();K.submitDivId=A;doRequest("request:loginforuserprofile",trim(A),K)}else{var G=trim(A);var B=trim(G).substring(0,trim(G).indexOf("@"));addconnection(new Array(B))}}}}}}}}}};handleCaptchaResponse=function(F,B,E){if(E.match("same")){var H=E.indexOf("+");var C=E.substring(H+1);var D=C.substring(0,C.indexOf("+"));var A=E.substring(E.lastIndexOf("+")+1,E.length);secureRequestDivId=null;extrnparams=null;var G=new Array();G.submitDivId=A;G.action="checkLoggedId";doRequest("request:isLoginCheck","",G)}else{if(E.match("notSame")){alert("Please enter a security code matching with provided image.");if(E.match("userSellerReview")){document.userSellerReviewForm.captchafield.focus()}else{if(E.match("userReview")){document.userReviewForm.captchafield.focus()}}secureRequestDivId=null;extrnparams=null}}};handleSellProductSubmitResponse=function(E,A,C){startId=C.indexOf("+");var B="";if(startId!=-1){B=C.substring(startId+1)}var D=document.getElementById("sellProduct"+trim(B));if(D){if(document.getElementById("maintab")){onlineSellerPage(trim(B),"");expandtab("maintab",0)}D.innerHTML="<span style='font-family: Tahoma; font-size: 11px; color: #2D96E7; font-weight: bold;padding-top:2px;'>"+C.substring(0,startId)+"</span>"}closeAllDivs("nodiv")};handleUserSignUpResponse=function(F,A,E){if(E.match("framework:status::")=="framework:status::"){var D=E;var C=parseError(E);var B=createErrorDivs(C,prerequestDivId);if(B!=null){var H=B.indexOf(":");fieldId=B.substring(0,H);fieldMesg=B.substring(H+1);fieldDivObj=document.getElementById("error:"+trim(fieldId));if(fieldDivObj){fieldDivObj.innerHTML=fieldMesg;fieldDivObj.style.color="yellow"}}changeStatus(F,"N");isRequestInProgress=false;secureRequestDivId=null;extrnparams=null;return false}else{if(E.match("naaptol")){doRequestAsync("changeHeader",path+"/faces/jsp/cspLogin.jsp",null,null,null,true)}else{doRequestAsync("changeHeader",path+"/faces/microSite/msCspLogin.jsp?sellerId="+sellerIdJs,null,null,null,true)}if(secureRequestDivId!=null&&secureRequestDivId=="request:userReview"){var G=new Array();G.action="checkLoggedId";G.submitDivId="submitUsrRev";doRequest("request:isLoginCheck","",G)}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:userSellerReview"){var G=new Array();G.action="checkLoggedId";G.submitDivId="submitUsrSellerRev";doRequest("request:isLoginCheck","",G)}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:loginforuserprofile"){var G=new Array();G.submitDivId="logintoconnect";G.action="checkLoggedId";doRequest("request:isLoginCheck","",G)}}}}};handleLoginResponse=function(O,F,L){if(L.match("framework:status::")=="framework:status::"){var I=L;var E=parseError(L);var P=createErrorDivs(E,prerequestDivId);if(P!=null){var M=P.indexOf(":");fieldId=P.substring(0,M);fieldMesg=P.substring(M+1);fieldDivObj=document.getElementById("error:"+trim(fieldId));if(fieldDivObj){fieldDivObj.innerHTML=fieldMesg;fieldDivObj.style.color="red"}}changeStatus(O,"N");isRequestInProgress=false;return false}else{var C=365;var N=new Date();N.setDate(N.getDate()+C);if(L.match("isMicroSite:true")){doRequestAsync("changeHeader",path+"/faces/microSite/msCspLogin.jsp?sellerId="+sellerIdJs,null,null,null,true);var B=document.getElementById("loginId").value}else{if(L.match("validSeller")){doRequestAsync("changeHeader",path+"/faces/jsp/cspLogin.jsp",null,null,null,true)}else{doRequestAsync("changeHeader",path+"/faces/jsp/cspLogin.jsp",null,null,null,true);var G=document.getElementById("personalizeUserHomePage");if(G){invoke(path+"/faces/user/personalizeUserHomePage.jsp?flag=1","personalizeUserHomePage")}}}if(secureRequestDivId!=null&&secureRequestDivId=="request:addToFavorite"){makeMyRequest(path+"/faces/components/product/addtoFavorites.jsp","productId="+extrnparams.productId+"&listId=0&pageId=checkProductInList","checkProductInList");secureRequestDivId=null;extrnparams=null}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:sellProduct"){makeRequest(path+"/faces/seller/saveSellProduct.jsp","productId="+extrnparams.productId+"&action=checkRecordExists&newId="+extrnparams.newId);secureRequestDivId=null;extrnparams=null}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:userReview"){var H=new Array();H.action="checkLoggedId";H.submitDivId="submitUsrRev";doRequest("request:isLoginCheck","",H)}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:userSellerReview"){var H=new Array();H.action="checkLoggedId";H.submitDivId="submitUsrSellerRev";doRequest("request:isLoginCheck","",H)}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:userProfileOfOtherUser"){var D=extrnparams.submitDivId.substring(0,extrnparams.submitDivId.indexOf("@"));showAnotherUserProfile(D)}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:checkUserForOrderNowForm"){var K=trim(extrnparams.submitDivId);var M=K.indexOf("-");var J=K.substring(M+1,K.length);openOrderNowPage(J);secureRequestDivId=null}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:loginforuserprofile"){var K=trim(extrnparams.submitDivId);var D=trim(K).substring(0,trim(K).indexOf("@"));addconnection(new Array(D))}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:subscribeToListLoginCheck"){var K=trim(extrnparams.submitDivId);var H=new Array();H.action="checkLoggedId";H.submitDivId=K;doRequest("request:isLoginCheck","",H);secureRequestDivId=null}else{if(secureRequestDivId!=null&&secureRequestDivId=="request:inviteFriendsLoginCheck"){window.location=path+"/faces/contactImporter/contactsImporter.jsp"}}}}}}}}}if(secureRequestDivId==""){if(document.getElementById("product_id")){var A=document.getElementById("product_id");offlineSellerPage(A.value,"")}}}};handleUserLogOutResponse=function(){doRequestAsync("changeHeader",path+"/faces/jsp/cspLogin.jsp",null,null,null,true);doRequest("request:SellerLoginForm","sellerLoginLink")};validateUserLogOut=function(D,C,A){var B=confirm("Are you Sure?");if(B){var E=getFormParameters("SellerLogOutPop");return E}else{return false}};handleSellerLogOutResponse=function(C,B,A){doRequestAsync("changeHeader",path+"/faces/jsp/cspLogin.jsp",null,null,null,true);doRequest("request:LoginForm","LoginForm_link")};validateSellerLogOut=function(D,C,A){var B=confirm("Are you Sure?");if(B){var E=getFormParameters("UserLogOutPop");return E}else{return false}};validateforgotPasswordSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("forgotPasswordForm");if(!isFieldBlank(E.forgotPasswordloginId,B,"Please Enter EmailId.","forgotPasswordloginId")){return false}if(!isEmailIdValid(E.forgotPasswordloginId,B,"Please Enter Valid EmailId.","forgotPasswordloginId")){return false}return E};validateuserSignUpSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("UserSignUpForm");if(!isFieldBlank(E.userSignUploginId,B,"Please Enter EmailId.","userSignUploginId")){return false}if(!isEmailIdValid(E.userSignUploginId,B,"Please Enter Valid EmailId.","userSignUploginId")){return false}if(!isFieldBlank(E.userSignUppassword,B,"Please Enter Password.","userSignUppassword")){return false}if(!isValidFieldValueLength(E.userSignUppassword,B,"Password should be 6-12 characters.","userSignUppassword",6,12)){return false}if(!isFieldBlank(E.userSignUprepassword,B,"Please Enter Re-Password.","userSignUprepassword")){return false}if(!isEqualTwoFieldStrings(E.userSignUppassword,E.userSignUprepassword,B,"Password and Re-Password should be same.","userSignUppassword","userSignUprepassword")){return false}if(!isFieldBlank(E.userSignUpfirstName,B,"Please Enter First Name.","userSignUpfirstName")){return false}if(!isNameisValid(E.userSignUpfirstName,B,"Please Enter Valid Name.","userSignUpfirstName")){return false}if(!isFieldBlank(E.userSignUpmobile,B,"Please Enter Mobile.","userSignUpmobile")){return false}if(!isMobileNoValid(E.userSignUpmobile,B,"Please enter a valid mobile number.(atleast 10 Numbers).","userSignUpmobile")){return false}if(!isAgree(E.userSignUpiagree,B,"userSignUpiagree")){return false}return E};validateSellerLoginSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("SellerSignInForm");if(!isFieldBlank(E.sellerSignInEmailId,B,"Please Enter EmailId.","sellerSignInEmailId")){return false}if(!isEmailIdValid(E.sellerSignInEmailId,B,"Please Enter Valid EmailId.","sellerSignInEmailId")){return false}if(!isFieldBlank(E.sellerSignInPassword,B,"Please Enter Password.","sellerSignInPassword")){return false}return E};validateSellerforgotPasswordSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("sellerForgotPasswordForm");if(!isFieldBlank(E.sellerforgotEmailId,B,"Please Enter EmailId.","sellerforgotEmailId")){return false}if(!isEmailIdValid(E.sellerforgotEmailId,B,"Please Enter Valid EmailId.","sellerforgotEmailId")){return false}return E};validateEditPriceSubmit=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("sellerEditPriceForm");if(!isFieldBlank(E.editprice,B,"Please Enter Price.","editprice")){return false}if(!isPinCodeValid(E.editprice,B,"Please Enter Valid Price(Only Number).","editprice")){return false}return E};handleEditPriceResponse=function(C,A,B){doRequestAsync("MyProfile3",path+"/faces/seller/sellerMyProducts.jsp",null,null,null,true);closeAllDivs("nodiv")};validateSubscribeRequest=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("SubscribeForm");if(!isFieldBlank(E.emailId,B,"Please Enter Your EmailId.","loginId")){return false}if(!isEmailIdValid(E.emailId,B,"Please Enter Valid EmailId.","loginId")){return false}return E};handleSubscribeResponse=function(D,A,C){if(C.match("success")=="success"){var B=C.substring(0,C.indexOf("+"));changeButtonToUnSubscribe(trim(B))}closeAllDivs("nodiv")};validateAddToList=function(D,C,A){clearDiv("error:message:"+A);var B=document.getElementById("error:message:"+A);var E=getFormParameters("addProductToListForm");if(E.selectListBox=="0"){B.innerHTML="Please Select List";return false}return E};handleAddToListResponse=function(D,A,B){if(B.indexOf("+")!=-1){productId=B.substring(0,B.indexOf("+"));var C=document.getElementById("favoriteup"+trim(productId));if(C){C.innerHTML=B.substring(B.indexOf("+")+1,B.length)}}closeAllDivs("nodiv")};