if(typeof NAP==="undefined"){NAP={}
}function launchGenericPopUp(b,c,a,d,f){var e=window.open(c,b,"width="+a+",height="+d+",menubar=no,location=no,resizable=1,status=no,scrollbars="+f);
if(window.focus){e.focus()
}}function launchNamePopUp(c,b,a,d){launchGenericPopUp(c,b,a,d,1)
}function help(a){launchNamePopUp("NAPHelp",a,670,540)
}function rollOverImage(g,b,c){var f=window.event||c;
function a(){g.src=b
}function d(){g.src=b
}if(g){if(f.type=="mouseover"){imageTimeout=setTimeout(a,200)
}else{if(f.type=="mouseout"){clearTimeout(imageTimeout);
d()
}}}}function clearDefault(a){if(a.defaultValue==a.value){a.value=""
}}NAP.getChannel=function(){return(typeof channel==="undefined")?"intl":channel
};
NAP.formPlaceholders=function(a){var b=(typeof a==="undefined")?true:a;
$("form [placeholder]").each(function(){if(!$(this).val()){$(this).addClass("placeholder");
$(this).val($(this).attr("placeholder"))
}});
$("form [placeholder]").bind("focus",function(c){$(this).removeClass("placeholder");
if($(this).attr("placeholder")==$(this).val()){$(this).val("")
}return false
});
if(b){$("form [placeholder]").bind("blur",function(c){if($(this).val()==""){$(this).addClass("placeholder");
$(this).val($(this).attr("placeholder"))
}return false
})
}};
NAP.bindPreviewArea=function(a){var b={};
var f=a.inputEl;
var h=a.targetEl;
var g=a.defaultTxt||"";
var i=a.postFix||"";
var c=a.preFix||"";
var e=a.emptyAlternative||"";
var d="";
if(e!==""){g=e
}b.update=function(){var j=$(f);
if(j.attr("placeholder")!=j.val()){d=(j.val()!=="")?j.val():g;
d=(d==="")?"":(c+d+i);
$(h).text(d)
}};
b.update();
$(f).bind("keyup blur",b.update);
return b
};
NAP.setFormFieldCharLimit=function(g,a,f){if(a.length===0){return
}var e=f||false;
var c=a.attr("id")+"-char-length";
var d;
if(e){$('<div id="'+c+'" class="char-length">Length <span class="char-count"></span>&nbsp;(max '+g+")</div>").insertAfter(a);
d=$("#"+c+" .char-count");
d.html(a.attr("value").length)
}function b(){if(e){d.html(a.attr("value").length)
}}a.keypress(function(h){b();
if(h.keyCode===0||$.browser.msie){return this.value.length<g
}});
a.keydown(function(h){b()
})
};
function validateEmailAddress(b){var a=new RegExp(/^(.+)@(.+)$/);
return a.test(b)
}function submitForgottenPassword(c,b){var a=$("#emailaddress");
if(!validateEmailAddress(a.attr("value"))){$("#signinform ul.error").remove();
$('<ul class="error"><li>'+c+"</li></ul>").prependTo($("#signinform"))
}else{window.location.href=b+a.attr("value")
}}function launchGenericPopUp(b,c,a,d,f){var e=window.open(c,b,"width="+a+",height="+d+",menubar=no,location=no,resizable=1,status=no,scrollbars="+f);
if(window.focus){e.focus()
}}function launchNamePopUp(c,b,a,d){launchGenericPopUp(c,b,a,d,1)
}function launchNamePopUpNoScroll(c,b,a,d){launchGenericPopUp(c,b,a,d,0)
}function launchPopUp(b,a,c){launchNamePopUp("MRP_pop",b,a,c)
}function launchPopUpNoScrolls(b,a,c){launchNamePopUpNoScroll("MRP_pop_noscr",b,a,c)
};var RecentlyViewed={init:function(){if($("#relatedProductContainer").length>0){$(".rv-link").click(function(a){a.preventDefault();
RecentlyViewed.toggleMe()
});
$("#relatedProductContainer").css("display","block");
$.ajax({url:"/"+NAP.getChannel()+"/recentlyvieweditems.mrp?load&exclude",cache:false,dataType:"json",success:function(a){RecentlyViewed.parseJson(a)
},error:function(a,b){$("#relatedProductContainer").css("display","none")
}});
$("#clear-related-products a").click(function(){$.ajax({url:"/"+NAP.getChannel()+"/recentlyvieweditems.mrp?delete&exclude",cache:false,dataType:"json",success:function(a){RecentlyViewed.parseJson(a);
CookieUtil.deleteCookie("recentlyViewedProducts")
},error:function(a,b){$("#relatedProductContainer").css("display","none")
}})
})
}},toggleMe:function(a){if($("#relatedProductContainer li").attr("class")=="open"){$("#recently-viewed-items").slideUp(350)
}else{$("#recently-viewed-items").slideDown(350)
}$("#relatedProductContainer").children("li").toggleClass("open");
RecentlyViewed.assessToggle()
},assessToggle:function(){var a=($("#relatedProductContainer > li.open").attr("class")==undefined)?"closed":"open";
RecentlyViewed.rvState(a)
},rvState:function(b){CookieUtil.deleteCookie("rvState");
var c=new Date();
var a="rvState="+escape(b)+"";
document.cookie=a+";path=/"
},parseJson:function(e){var d=document.createElement("ul");
for(var c=0;
c<e.length;
c++){var f=e[c];
var a=RecentlyViewed.newProductListNode(f.pid,f.title,f.designer);
d.appendChild(a)
}var b=document.getElementById("recently-viewed-list");
if(b!=null){if(b.hasChildNodes()){b.removeChild(b.childNodes[0])
}}if(e.length>0){b.appendChild(d);
$("#recently-viewed-list").napCarousel({btnNext:".rv-next",btnPrev:".rv-prev",visible:6,circular:false});
$("#relatedProductContainer").css("display","block")
}else{if(e.length==0){$("#relatedProductContainer").css("display","none")
}}if(CookieUtil.getCookie("rvState")==="closed"||e.length<2){$("#recently-viewed-items").slideUp(1);
$("#relatedProductContainer li").removeClass("open")
}},newProductListNode:function(b,f,i){var g=document.createElement("li");
var c=document.createElement("a");
c.setAttribute("title",f);
c.setAttribute("href",window.location.protocol+"//"+window.location.host+"/product/"+b);
var a=document.createElement("div");
a.setAttribute("class","rvProductImage");
c.appendChild(a);
var e=document.createElement("img");
e.setAttribute("src",window.location.protocol+"//www.mrporter.com/images/products/"+b+"/"+b+"_mrp_in_s.jpg");
a.appendChild(e);
var d=document.createElement("a");
d.setAttribute("href",window.location.protocol+"//"+window.location.host+"/product/"+b);
d.setAttribute("title",f);
d.innerHTML=i;
var h=document.createElement("div");
h.setAttribute("class","rvProductName");
h.appendChild(d);
c.appendChild(h);
g.appendChild(c);
return g
}};function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");
if(c_start!=-1){c_start=c_start+a.length+1;
c_end=document.cookie.indexOf(";",c_start);
if(c_end==-1){c_end=document.cookie.length
}return unescape(document.cookie.substring(c_start,c_end))
}}return""
}var locale_channel=getCookie("channel"),overlay="&amp;overlay=true";
function overlayForm(e,d){var a=d||{};
var j=a.iFrameHeight||549;
var c=a.iFrameWidth||750;
var k=a.dialogHeight||580;
var g=a.dialogWidth||750;
var h=a.overlayHeader||"";
var i=a.addClass||"";
var f=(e.href.indexOf("?")!=-1)?"&":"?",b=e.href+f+"overlay=true",l="<iframe src='"+b+"' frameborder='0' height='"+j+"' width='"+c+"'></iframe>";
NAP.overlayPanel({title:h,message:l,type:"info",theme:"light",width:g,height:k,addClass:i,onReady:function(){$("#lightbox-close").html("<img src='/mrporter/build/2011.17.00/images/buttons/close-overlay.gif' alt='Close' />")
}})
}var OverlayForms={init:function(){CustomerCareOverlay.displayOverlay();
FashionAdvisorOverlay.displayOverlay();
TellAFriendOverlay.displayOverlay();
MyAccountOverlay.displayOverlay();
ItemUpdate.displayOverlay();
DesignerUpdate.displayOverlay()
}};
var CustomerCareOverlay={displayOverlay:function(){$(".cc-overlay").click(function(a){a.preventDefault();
overlayForm(this,{overlayHeader:"<div id='container_head'><h1>Customer care team - at your service</h1></div>",addClass:"customer-care"})
})
}};
var FashionAdvisorOverlay={displayOverlay:function(){$(".fashion-advisor-link").click(function(a){a.preventDefault();
overlayForm(this,{addClass:"fashion-advisor"})
})
}};
var TellAFriendOverlay={displayOverlay:function(){$("#tell-a-friend-link").click(function(a){a.preventDefault();
overlayForm(this,{iFrameWidth:765,dialogWidth:775,iFrameHeight:565,dialogHeight:615,addClass:"tellafriend-overlay"})
})
}};
var MyAccountOverlay={displayOverlay:function(){$(".ma-overlay").click(function(a){a.preventDefault();
overlayForm(this,{iFrameWidth:750,dialogWidth:780,iFrameHeight:510})
})
}};
var FashionAdvisorRecommendationOverlay={initOverlay:function(){$(".fashion-advisor-rec-link").click(function(a){a.preventDefault();
overlayForm(this)
})
}};
var FriendRecommendationOverlay={initOverlay:function(){$(".friend-rec-link").click(function(a){a.preventDefault();
overlayForm(this,{dialogHeight:410,iFrameHeight:400})
})
}};
var DesignerUpdate={displayOverlay:function(){$(".sign-up-link").click(function(a){a.preventDefault();
overlayForm(this,{iFrameHeight:595,iFrameWidth:793,dialogHeight:645,dialogWidth:792,overlayHeader:"<h1>designer updates</h1>",addClass:"designer-update"})
});
$(".signup-for-updates-link").click(function(a){a.preventDefault();
overlayForm(this,{iFrameHeight:595,iFrameWidth:793,dialogHeight:645,dialogWidth:792,overlayHeader:"<h1>designer updates</h1>",addClass:"designer-update"})
})
}};
var RecommendationOverlay={init:function(){$("#wm-menu-how , .wm-rec-how-to").bind("click",function(c){c.preventDefault();
var d="/"+channel+"/recommendations-help.mrp";
var b=530;
var a=730;
NAP.overlayPanel({theme:"light",title:'<h1 class="wm-rec-how-title">How it works</h1>',type:"info",width:a+16,height:b+60,message:'<iframe src="'+d+'" height="'+b+'" width="'+a+'" frameborder="0" style="border:none; margin-top:-25px;"></iframe>'})
})
}};
var ItemUpdate={checkItemStatus:function(c){if($(c).attr("href").match(/\/product\/(\d+)/)){var a=$(c).attr("href").match(/\/product\/(\d+)/)[1],b="/webapi/feed/searchableproduct/status/"+a+".json";
$.getJSON(b,function(d){if(d.productAvailability.status=="UNAVAILABLE"){ItemUpdate.renderOverlay(a)
}else{window.location.href="/product/"+a
}})
}},renderOverlay:function(a){NAP.overlayPanel({title:"<h1>Item Update:</h1>",message:"<iframe src='/"+locale_channel+"/productUpdatesRegistration.mrp?productId="+a+overlay+"' frameborder='0' id='registration-form' name='registrationFrame' height='595' width='790'></iframe>",type:"info",theme:"light",addClass:"item-updates",width:793,height:645})
},displayOverlay:function(){$(".product-item").click(function(a){a.preventDefault();
ItemUpdate.checkItemStatus(this)
})
}};
var displayBagOverlay={init:function(){if(this.isReady()){this.clearReady();
if(document.getElementById("wishlist-added")){displayBagOverlay.initNotification($("#wishlist-added"))
}else{if(document.getElementById("bag-added")){if($(".wishlist-added").length||$(".recommend-added").length){function b(d){var e=$("#sign-in-links-"+d);
if(e.length){var f=e.offsetParent().position().left;
f=f+e.position().left-70;
$("."+d+"-added").css({left:f+"px",display:"block"})
}$(".close").click(function(){c()
});
setTimeout(function(){c()
},5000)
}function c(){$("#bag-added").fadeOut(function(){$(this).remove()
})
}var a=$(".wishlist-added").length?"wishlist":"recommend";
b(a)
}else{displayBagOverlay.initNotification($("#bag-added"))
}}}}},initNotification:function(h){var g,d,a="";
var e=null;
var c=h.attr("class").split(" ");
var f={};
for(var b in c){d=c[b];
if(d.indexOf("sku_")==0){g=d.replace("sku_","")
}else{if(d.indexOf("status_")==0){a=d.replace("status_","");
f[g]=a
}}}h.remove();
if(h.attr("id")=="wishlist-added"){e="wishlist-header-notification"
}else{if(h.attr("id")=="bag-added"){e="bag-header-notification"
}}NAP.notificationDialog({mapOfStatuses:f},null,e)
},readyWishlist:false,readyRecommend:false,isReady:function(){return this.readyWishlist&&this.readyRecommend
},clearReady:function(){this.readyWishlist=false;
this.readyRecommend=false
},notifyWishlist:function(){this.readyWishlist=true;
this.init()
},notifyRecommend:function(){this.readyRecommend=true;
this.init()
}};
$(document).ready(function(){OverlayForms.init()
});/*!
 * Color animation jQuery-plugin
 * http://www.bitstorm.org/jquery/color-animation/
 * Based on code copyright 2007 John Resig
 * Copyright 2010 Edwin Martin <edwin@bitstorm.org>
 * Released under the MIT and GPL licenses.
 */
(function(e){var a=["color","backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","outlineColor"];
e.each(a,function(f,g){e.fx.step[g]=function(h){if(!h.init){h.begin=c(e(h.elem).css(g));
h.end=c(h.end);
h.init=true
}h.elem.style[g]=d(h.begin,h.end,h.pos)
}
});
e.fx.step.borderColor=function(f){if(!f.init){f.end=c(f.end)
}var g=a.slice(2,6);
e.each(g,function(h,j){if(!f.init){f[j]={begin:c(e(f.elem).css(j))}
}f.elem.style[j]=d(f[j].begin,f.end,f.pos)
});
f.init=true
};
function d(g,f,h){return"#"+b(g[0]+h*(f[0]-g[0]))+b(g[1]+h*(f[1]-g[1]))+b(g[2]+h*(f[2]-g[2]))
}function b(f){var g=parseInt(f).toString(16);
return g.length==1?"0"+g:g
}function c(f){var g,h;
if(g=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(f)){h=[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]
}else{if(g=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(f)){h=[parseInt(g[1],16)*17,parseInt(g[2],16)*17,parseInt(g[3],16)*17]
}else{if(g=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){h=[parseInt(g[1]),parseInt(g[2]),parseInt(g[3])]
}}}return h
}})(jQuery);NAP.mainNav=function(f){f=f||{};
var d=f.showTime||0.05;
var c=f.hideTime||0.5;
var b=f.container||"#mainnav";
var a=f.subnavs||".main-menu";
var e=false;
$(b).removeClass("no-js");
$(a).each(function(){var g,m;
var l=false;
var j=this;
var k=$(j).find(".sub");
var h=function(){k.css({opacity:"0",display:"block"}).stop().fadeTo("fast",1);
l=true
};
var i=function(){k.stop().fadeTo("fast",0,function(){$(this).hide()
});
l=false
};
$(j).hover(function(n){clearTimeout(g);
if(!l){if(e){e()
}m=setTimeout(h,d*1000)
}},function(n){clearTimeout(m);
e=i;
g=setTimeout(i,c*1000)
})
})
};var MrPorterHeader={isUserSignedIn:false,isUserRemembered:false,init:function(b){var a=this;
$.getJSON(this.getApiUrl(b,"auth/status.json"),function(c){if(c){if(c.response==="SIGNED_IN"){a.isUserSignedIn=true;
$.ajax({url:"https:"+a.getApiUrl(b,"account/customer.jsonp"),dataType:"jsonp",success:function(d){if(d.data){a.refreshName(d.data.title,d.data.surname);
a.refreshAuthStatus(true);
a.refreshWishList(b)
}else{a.refreshAuthStatus(false);
a.hideWishList()
}},complete:function(e,d){if(d!=="success"){a.refreshAuthStatus(false);
a.hideWishList()
}}})
}else{a.refreshAuthStatus(false);
if(c.response==="REMEMBERED"){a.isUserRemembered=true;
$.getJSON(a.getApiUrl(b,"auth/remembered.json"),function(d){a.refreshName(d.data.title,d.data.surname)
});
a.refreshWishList(b)
}else{a.hideWishList()
}}}else{a.refreshAuthStatus(false);
a.hideWishList()
}MrPorterHeader.myAccountMegaMenu()
});
if($(".error-page").length>0){$.getJSON(MrPorterHeader.getApiUrl(b,"locality/country.json"),function(c){$("#country_select").html(c.data.name)
})
}this.refreshShoppingBag(b);
this.refreshRecommendations(b)
},getApiUrl:function(a,b){return"//"+window.location.hostname+"/"+a+"/api/"+b
},refreshName:function(b,a){$("#header-inject-name").html(" "+b+" "+a)
},refreshAuthStatus:function(a){if(a){$("#header-inject-isauth").show();
MrPorterHeader.positionArrow()
}else{$("#header-inject-notauth").show()
}},refreshWishList:function(a){$.getJSON(this.getApiUrl(a,"wishlist/itemcount.json"),function(b){if(b.wishlistItemCount>0){$("#header-inject-wistlist").show()
}if(displayBagOverlay){displayBagOverlay.notifyWishlist()
}})
},hideWishList:function(){$("#header-inject-wistlist").hide();
if(displayBagOverlay){displayBagOverlay.notifyWishlist()
}},refreshShoppingBag:function(a){$.getJSON(this.getApiUrl(a,"basket/itemcount.json"),function(b){$("#header-inject-bagcount").html(b.totalQuantity);
if(b.totalQuantity===1){$("#header-inject-bagcount-plural").hide()
}$("#basket-items-count").show()
})
},refreshRecommendations:function(a){$.getJSON(this.getApiUrl(a,"recommend/itemcount.json"),function(b){if(b.data.itemCount>0){$("#header-inject-recommend").show()
}if(displayBagOverlay){displayBagOverlay.notifyRecommend()
}})
},positionArrow:function(){var a=$("#sign-link").width()+($("#my-account-trigger").width()/2);
$("#top-megamenu").css("padding-left",a)
},myAccountMegaMenu:function(){if(MrPorterHeader.isUserSignedIn){var b=NAP.getChannel();
var c=['<div id="top-megamenu"><img src="/mrporter/build/2011.17.00/images/global/megamenu-top.png" /></div>','<div id="menu-container">','<div id="account">','<h4><a href="/'+b+'/myaccount.mrp">My Account</a></h4>',"<ul>",'<li><a href="/'+b+'/accountdetails.mrp">Account Details</a></li>','<li><a href="/'+b+'/myaccount.mrp?forwardTo=emailSettings">My Email Preferences</a></li>','<li><a href="/'+b+'/customerpreferences.mrp">My Designers</a></li>','<li><a href="/'+b+'/CustomerOrders.mrp">My Orders</a></li>','<li><a href="/'+b+'/customervouchers.mrp">My Gift Cards</a></li>',"</ul>","</div>",'<div id="wardrobe">','<h4><a href="/'+b+'/wardrobe.mrp">Wardrobe Manager</a></h4>',"<ul>",'<li><a href="/'+b+'/wishlist.mrp">Wish List</a></li>','<li><a href="/'+b+'/recommendations.mrp">Recommendations</a></li>','<li><a href="/'+b+'/inventory.mrp">Inventory</a></li>',"</ul>","</div>","</div>"].join("");
var a=$("<div/>",{css:{display:"none"},id:"myaccount-mega-menu"}).appendTo("#my-account-trigger");
var d=$("#sign-in-links").height()-2;
$(a).append(c);
$("#myaccount-mega-menu").css("top",d);
$("#my-account-trigger").bind("mouseenter",function(){$("#myaccount-mega-menu").css("display","block")
});
$("#my-account-trigger").bind("mouseleave",function(){$("#myaccount-mega-menu").fadeOut("fast")
})
}}};
$(document).ready(function(){if(NAP&&NAP.getChannel){MrPorterHeader.init(NAP.getChannel())
}});$(document).ready(function(){RecentlyViewed.init()
});var demomode=1;
var i=0;
var popUpType=1;
var interstitial_type=1;
var vslgSurveyName="mrporter_survey_3167";
var triggerLocation=new Array();
var vslgDefaultLocationNumber=97;
var i=0;
host=window.location.protocol+"//"+window.location.hostname;
triggerLocation[0]={slocation:host+"/",channel:"intl",locNumber:1};
triggerLocation[1]={slocation:host+"/",channel:"am",locNumber:2};
for(var i=0;
i<triggerLocation.length;
i++){if((triggerLocation[i].slocation&&document.location.toString().indexOf(triggerLocation[i].slocation)>-1)&&channel&&channel==triggerLocation[i].channel){vslgDefaultLocationNumber=triggerLocation[i].locNumber
}}var lang=9;
var vslgPopupHeight=540;
var vslgPopupWidth=650;
var pageProt=location.protocol;
if(location.protocol=="file:"){pageProt="http:"
}var vslgIntervalURL=pageProt+"//survey.euro.confirmit.com/isa/HMCYGPGAHXJXBHABPDEBCDDRJDMAGPBF/3167_MrPorter_DTH/job3167interval.js";
var vslgPopupURL=pageProt+"//survey.euro.confirmit.com/wix/p637528292.aspx";
var vslgCookiePersistence=30*24*60*60*1000;
var vslgIntervalRetry=500;
var vslgIntervalTimeout=5000;
var vslgInterval=0;
var vslgIntervalID;
var vslgIntervalAttempts=0;
var surveyLater,currentTime,surveyLaterStart;
var vslgPu;
var vslgSWidth=0;
var vslgSHeight=0;
var vslgCook=3;
getScreenDimensions();
cookiesEnabled();
var vslgrandomnum=Math.floor(Math.random()*1000);
var vslgHitSample=false;
if(demomode==1){if(!window.onload){window.onload=function(){attachRemoteScript()
}
}else{curr_onload=window.onload;
window.onload=function(){curr_onload();
attachRemoteScript()
}
}}else{var dropdown=document.createElement("select");
dropdown.id="locationSelector";
var option2=new Array();
for(var i=0;
i<triggerLocation.length;
i++){option2[i]=document.createElement("option");
if(triggerLocation[i].shost){option2[i].innerHTML="Location: "+triggerLocation[i].locNumber+" - URL: "+triggerLocation[i].shost+triggerLocation[i].spath
}if(triggerLocation[i].stitle){option2[i].innerHTML="Location: "+triggerLocation[i].locNumber+" - Page Title: "+triggerLocation[i].stitle
}option2[i].value=triggerLocation[i].locNumber;
dropdown.appendChild(option2[i])
}document.body.appendChild(dropdown)
}function vslfGetCookieVal(b){var a=document.cookie.indexOf(";",b);
if(a==-1){a=document.cookie.length
}return unescape(document.cookie.substring(b,a))
}function vslfGetCookie(d){var b=d+"=";
var f=b.length;
var a=document.cookie.length;
var e=0;
while(e<a){var c=e+f;
if(document.cookie.substring(e,c)==b){return vslfGetCookieVal(c)
}e=document.cookie.indexOf(" ",e)+1;
if(e==0){break
}}return null
}function vslfSetCookie(c,e){var a=vslfSetCookie.arguments;
var h=vslfSetCookie.arguments.length;
var b=(h>2)?a[2]:null;
var g=(h>3)?a[3]:null;
var d=(h>4)?a[4]:null;
var f=(h>5)?a[5]:false;
document.cookie=c+"="+escape(e)+((b==null)?"":("; expires="+b.toGMTString()))+((g==null)?"":("; path="+g))+((d==null)?"":("; domain="+d))+((f==true)?"; secure":"")
}function vslfCheckIntervalFile(){try{setSampleIntervalRemote();
if(vslgInterval!=0){vslgHitSample=((vslgrandomnum+1)*vslgInterval/1000<=1)&&vslgCook!="2"&&vslfGetCookie(vslgSurveyName)!=1
}clearInterval(vslgIntervalID);
if(vslgHitSample){fixLinks()
}}catch(a){vslgIntervalAttempts++;
if((vslgIntervalAttempts*vslgIntervalRetry)>vslgIntervalTimeout){clearInterval(vslgIntervalID)
}}}function setSampleInterval(a){vslgInterval=a
}function attachRemoteScript(){var a=document.createElement("script");
a.id="vsltrs";
a.setAttribute("type","text/javascript");
a.setAttribute("src",vslgIntervalURL);
var b=document.getElementsByTagName("head")[0];
b.appendChild(a);
vslgIntervalID=setInterval("vslfCheckIntervalFile()",vslgIntervalRetry)
}function attachDoPop(b){if(!b.onclick){b.onclick=function(){vslfDoPop(vslgDefaultLocationNumber,this)
}
}else{b.curr_on=b.onclick;
b.onclick=function(){vslfDoPop(vslgDefaultLocationNumber,this);
this.curr_on()
}
}var a;
if(popUpType==1){a="This link also opens a new window"
}if(popUpType==2){a="This link will take you to a page asking you to participate in a survey"
}if(b.title!=""){b.title=b.title+"."+a
}else{b.title=a
}}function fixLinks(){if(popUpType==1||(popUpType==2&&interstitial_type==1)){var a=document.getElementsByTagName("a");
for(var b=0;
b<a.length;
b++){if(popUpType==1&&(a[b].href)){attachDoPop(a[b])
}if(popUpType==2&&interstitial_type==1&&(a[b].href&&(a[b].protocol=="http:"||a[b].protocol=="https:")&&!a[b].target&&!a[b].onclick)){attachDoPop(a[b])
}}a=document.getElementsByTagName("input");
for(b=0;
b<a.length;
b++){if(popUpType==1&&(a[b].type=="submit"||a[b].type=="button")){attachDoPop(a[b])
}}}if(popUpType==2&&interstitial_type==2){vslfDoPop(vslgDefaultLocationNumber)
}}function vslfDoPop(a,b){var d=vslgPopupURL+"?c="+a+"&l="+lang+"&w="+vslgSWidth+"&h="+vslgSHeight+"&k="+vslgCook+"&si="+vslgInterval+"&pt="+popUpType;
if(a==-1){a=vslgDefaultLocationNumber
}if(vslgHitSample&&vslfGetCookie(vslgSurveyName)!=1){if(popUpType==1){if(vslgPu!=undefined&&!vslgPu.closed&&vslgPu.location){vslgPu.location.href=d
}else{vslgPu=window.open(d,vslgSurveyName+Math.floor(Math.random()*1e+21),"height="+vslgPopupHeight+",width="+vslgPopupWidth+",resizable=yes,scrollbars=yes,toolbar=no,menubar=no");
if(!vslgPu.opener){vslgPu.opener=self
}var c=new Date();
c.setTime(c.getTime()+(vslgCookiePersistence));
vslfSetCookie(vslgSurveyName,"1",c,"/")
}if(self.focus&&vslgPu){self.focus()
}}if(popUpType==2&&interstitial_type==1){b.href=vslgPopupURL+"?oh="+b.href+"&c="+vslgDefaultLocationNumber;
var c=new Date();
c.setTime(c.getTime()+(vslgCookiePersistence));
vslfSetCookie(vslgSurveyName,"1",c,"/")
}if(popUpType==2&&interstitial_type==2){var c=new Date();
c.setTime(c.getTime()+(vslgCookiePersistence));
vslfSetCookie(vslgSurveyName,"1",c,"/");
window.location=vslgPopupURL+"?oh="+window.location.href+"&c="+vslgDefaultLocationNumber
}}}function getScreenDimensions(){if(window.screen){vslgSWidth=window.screen.width;
vslgSHeight=window.screen.height
}}function cookiesEnabled(){vslfSetCookie("cookieenabledcheck","1");
if(vslfGetCookie("cookieenabledcheck")==1){vslgCook=1
}else{vslgCook=2
}};
