function $(){var C=new Array();
for(var B=0;
B<arguments.length;
B++){var A=arguments[B];
if(typeof A=="string"){A=document.getElementById(A)
}if(arguments.length==1){return A
}C.push(A)
}return C
}function hackDoGet(){if("Wicket" in window&&"Browser" in Wicket&&Wicket.Browser.isGecko()&&"Ajax" in Wicket&&"Request" in Wicket.Ajax){var A=Wicket.Ajax.Request.prototype.doGet;
Wicket.Ajax.Request.prototype.doGet=function(){var C=document.location.href;
var B=C.lastIndexOf("/");
var E="";
while(B>0&&!/^[a-z]:\/+$/.test(C.substring(0,B))){var D=C.substring(0,B+1);
if(this.url.indexOf(D)==0){this.url=E+this.url.substring(D.length);
break
}C=C.substring(0,B);
B=C.lastIndexOf("/");
E+="../"
}A.apply(this,[])
}
}}function setColumnHeights(){hackDoGet();
var A=document.getElementById("contentColumn");
var C=document.getElementById("moduleColumn");
var B=getWindowHeightElem();
if(C!=null){if((A.offsetHeight<B)&&(C.offsetHeight<B)){A.style.height=(B-10)+"px"
}else{if(A.offsetHeight<C.offsetHeight){A.style.height=C.offsetHeight+"px"
}}}else{if(A.offsetHeight<B){A.style.height=(B-10)+"px"
}}return 0
}function setMediaColumnHeights(){var B=getWindowHeightElem();
var C=document.getElementById("leftColumn").offsetHeight;
var A=document.getElementById("mediaHeader").offsetHeight+document.getElementById("header").offsetHeight+37;
if((A+C)<B){document.getElementById("leftColumn").style.height=(B-A)+"px"
}return 0
}function getWindowHeightElem(){var A="";
if(window.innerHeight){A=window.innerHeight
}else{if(document.documentElement&&document.documentElement.clientHeight){A=document.documentElement.clientHeight
}else{if(document.body.clientHeight){A=document.body.clientHeight
}}}return A
}function getElementsByClassName(E,K,C){K=K||"*";
C=C||document;
var M=C.getElementsByTagName(K);
if(!M.length&&K=="*"&&C.all){M=C.all
}var L=new Array();
var A=E.indexOf("|")!=-1?"|":" ";
var N=E.split(A);
for(var J=0,I=M.length;
J<I;
J++){var H=M[J].className.split(" ");
if(A==" "&&N.length>H.length){continue
}var O=0;
comparisonLoop:for(var G=0,F=H.length;
G<F;
G++){for(var D=0,B=N.length;
D<B;
D++){if(N[D]==H[G]){O++
}if((A=="|"&&O==1)||(A==" "&&O==N.length)){L.push(M[J]);
break comparisonLoop
}}}}return L
}function getElementsByOneClassName(C){var D=new Array();
var B=new RegExp("(^| )"+C+"( |$)");
var A=document.getElementsByTagName("*");
var E=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
if(document.all&&!E){A=document.all
}for(i=0,j=0;
i<A.length;
i++){if(B.test(A[i].className)){D[j]=A[i];
j++
}}return D
}function showAllFAQAnswers(){hide("faqToggle");
var C=getElementsByClassName("answer");
for(var A=0;
A<C.length;
A++){C[A].style.display="block"
}var B=getElementsByClassName("question");
for(var A=0;
A<B.length;
A++){B[A].style.fontWeight="bold"
}setColumnHeights();
return 0
}function toggleAnswer(E){var B=false;
var D=E;
var C=D.nextSibling;
var A=0;
while(!B){A++;
if(C!==null&&C.className=="answer"){switch(C.style.display){case"block":E.style.fontWeight="normal";
C.style.display="none";
break;
case"none":default:E.style.fontWeight="bold";
C.style.display="block";
break
}B=true
}else{D=C;
C=D.nextSibling
}}setColumnHeights();
return 0
}function displayLoginBox(C,A){var B='<div class="grayContainer" style="'+A+'">\n					 	<div class="grayContHeader">\n							<div class="corner"></div>\n						</div>\n						<div class="grayContBody">\n							<div class="corner">\n								<div class="grayContContent">\n									<div class="loginField">\n										<div class="loginLabel">username:</div>\n										<input type="text" id="username" name="username" class="loginInput" />\n									</div>\n									<div class="loginField">\n										<div class="loginLabel">password:</div>\n										<input type="password" id="password" name="password" class="loginInput" />\n									</div>\n									<div style="text-align:left;">\n										<input type="submit" class="submitButton" value="submit" />\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="grayContFooter">\n							<div class="corner"></div>\n						</div>\n					</div>';
document.getElementById(C).innerHTML=B
}function compareTwoInputFields(A,B){if(document.getElementById(A).value!=document.getElementById(B).value){return false
}else{return true
}}function showElem(B,A){currentElem=document.getElementById(B);
currentElem.style.display=A;
currentElem.style.height="100%"
}function hideElem(A){currentElem=document.getElementById(A);
currentElem.style.display="none";
currentElem.style.height=0;
return 0
}function toggleLayer(C){var A,B;
if(document.getElementById){A=document.getElementById(C)
}else{if(document.all){A=document.all[C]
}else{if(document.layers){A=document.layers[C]
}}}B=A.style;
if(B.display==""&&A.offsetWidth!=undefined&&A.offsetHeight!=undefined){B.display=(A.offsetWidth!=0&&A.offsetHeight!=0)?"inline":"none"
}B.display=(B.display==""||B.display=="inline")?"none":"inline"
}function toggle(A){elem=document.getElementById(A);
if(elem.style.display==""||elem.style.display=="block"){elem.style.display="none"
}else{elem.style.display=""
}}function toggleArrow(A){if(A.src.indexOf("UpArrow.gif")>0){A.src="/images/DownArrow.gif"
}else{A.src="/images/UpArrow.gif"
}}function hide(A){if(document.getElementById){elem=document.getElementById(A)
}else{if(document.all){elem=document.all[A]
}else{if(document.layers){elem=document.layers[A]
}}}if(elem){vis=elem.style;
vis.display="none"
}}function show(A){if(document.getElementById){elem=document.getElementById(A)
}else{if(document.all){elem=document.all[A]
}else{if(document.layers){elem=document.layers[A]
}}}if(elem){vis=elem.style;
vis.display="inline"
}}function highlightActiveNavElem(){var C=window.location.pathname.split("/");
if(C.slice(2).toString()=="invites"||C.slice(1)[0].toString()=="getmedium"){toggleNav();
show("navActivator")
}try{var B=document.getElementById(C[C.length-1]+"Nav");
var A=B.className;
B.className=A+" activeNavElem"
}catch(D){}}function allPurposeMailer(C,A,K,I){var D="to:";
var B="mail";
var E=K;
var H="@";
var G=C;
var F=A;
var J=I;
document.write('<a href="'+B+D+E+H+G+"?subject="+F+'">'+J+"</a>")
}function allPurposeMailerWithBody(C,A,M,K,D){var E="to:";
var B="mail";
var F=M;
var J="@";
var I=C;
var G=A;
var L=K;
var H=D;
document.write('<a href="'+B+E+F+J+I+"?subject="+G+"&body="+H+'">'+L+"</a>")
}function imageMailer(C,A,I){var D="to:";
var B="mail";
var E=I;
var G="@";
var H=C;
var F=A;
document.write('<a href="'+B+D+E+G+H+"?subject="+F+'">')
}function imageMailerWithBody(C,A,K,D){var E="to:";
var B="mail";
var F=K;
var I="@";
var H=C;
var G=A;
var J=D;
document.write('<a href="'+B+E+F+I+H+"?subject="+G+"&body="+J+'">')
}function mailerTail(){document.write("</a>")
}function getFlashMovie(B){var A=navigator.appName.indexOf("Microsoft")!=-1;
return(A)?window[B]:document[B]
}function sendToFlash(A){getFlashMovie(A).sendBrowserToFlash(validBrowserCheck())
}function validBrowserCheck(){var D=navigator.userAgent;
var F=null;
var E=["Firefox","BonEcho","GranParadiso","Minefield","Iceweasel"];
for(var C in E){var B=E[C];
if(D.match(B)){F=B;
break
}}if(F!=null){var A=parseFloat(D.substring(D.indexOf(F)+F.length+1));
if(A>=1.5){return"supportedFF"
}else{return"unsupportedFF"
}}else{if(D.match("Songbird")){return"supportedFF"
}else{if(D.match("MSIE")){var A=D.substring(D.indexOf("MSIE")+5,D.indexOf("MSIE")+8);
if(A==7){return"supportedIE"
}else{if(A>7){return"supportedIE8"
}else{return"unsupportedIE"
}}}else{if(D.match("Flock")){return"supportedFlock"
}else{return"unsupportedBrowser"
}}}}}function isIE6(){if(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5,navigator.userAgent.indexOf("MSIE")+8)==6){return true
}return false
}function handleDownload(B){if(B==null){B=getDefaultDownloadUrl()
}var A=validBrowserCheck();
switch(A){case"supportedFF":case"supportedFlock":location.href=B;
shieldElem=document.createElement("div");
shieldElem.id="dlShield";
hide("tutorial");
document.getElementsByTagName("body")[0].appendChild(shieldElem);
document.getElementById("dlShield").style.display="block";
newElem=document.createElement("div");
newElem.id="dlMsgCont";
document.getElementsByTagName("body")[0].appendChild(newElem);
document.getElementById("dlMsgCont").innerHTML='<div class="grayContOvrShield downloadPanel" id="supFFDLContent">\n						<div class="content">\n							<div class="t"></div>\n								<div id="dlContainerControl"><a href="javascript:void(0);" onclick="javascript:closeDLContent(\'supFFDLContent\');">X</a></div>\n								<div id="downloadInstructions">\n									<h2>Please follow these steps to join <span class="orangehighlight">Me.</span>dium:</h2>\n									<ol>\n										<li>Click <span class="greenhighlight">"Edit Options"</span> at the top-right of your screen and your browser will open a panel.\n											Click <span class="greenhighlight">"Allow"</span>, and close this panel.</li>\n										<li>Click the <span class="greenhighlight">"Download"</span> button below, and then click <span class="greenhighlight">"Install"</span>.</li>\n										<li>Restart your browser.</li>\n									</ol>\n								</div>\n								<div id="downloadTerms"><p>By clicking "Download", you are agreeing to Me.dium\'s <a href="https://me.dium.com/terms" target="_blank">Terms of Use</a>.</p><p>This plug-in shares your browsing activity with Me.dium. <a href="https://me.dium.com/privacy" target="_blank">Get the facts here!</a></p><br /></div>\n								<div id="dlImageCont"><a href="'+B+'"><img src="/images/download.gif" alt="download me.dium" /></a></div>\n						 	</div>\n						 <div class="b"><div></div></div>\n					</div>';
document.getElementById("supFFDLContent").style.display="block";
break;
case"supportedIE":window.location.href(B);
break;
case"supportedIE8":window.location.href(B);
break;
case"unsupportedFF":case"unsupportedIE":default:shieldElem=document.createElement("div");
shieldElem.id="dlShield";
document.getElementsByTagName("body")[0].appendChild(shieldElem);
dlShieldStyle=document.getElementById("dlShield").style;
dlShieldStyle.display="block";
dlShieldStyle.filter="alpha(opacity=70)";
dlShieldStyle.position="absolute";
dlShieldStyle.top=0;
dlShieldStyle.zIndex=100;
dlShieldStyle.height=1000+"px";
newElem=document.createElement("div");
newElem.id="dlMsgCont";
document.getElementsByTagName("body")[0].appendChild(newElem);
document.getElementById("dlMsgCont").innerHTML='<div  style="background:none #efefef;border:1px solid #ccc;padding:10px;"  class="grayContOvrShield downloadPanel" id="unsupDLContent" \n						<div class="content">\n								<div id="dlContainerControl"><a href="javascript:void(0);" onclick="javascript:closeDLContent(\'unsupDLContent\');">X</a></div>\n									<div id="downloadInstructions">\n									<p>You will need either Firefox (1.5 or later), Flock, Songbird, or Internet Explorer 7 to use Me.dium.\n										Please download and install <a href="http://www.getfirefox.com">Firefox</a> or <a href="http://spread.flock.com/buttons/?user=&ref=getFlock-EN.gif">Flock</a> or <a href="http://songbirdnest.com/partners">Songbird</a> or <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer 7</a> and revisit this page using that browser.</p>\n								<div id="dlImageCont" style="padding-top:12px;">\n									<a href="http://www.getfirefox.com"><img src="/images/firefox-spread-btn-1.gif" alt="get firefox" /></a>\n									<a href="http://spread.flock.com/buttons/?user=&ref=getFlock-EN.gif"><img src="/images/getFlock.gif" alt="get flock" style="padding:0px 12px;" /></a>\n									<br /><br />\n									<a href="http://songbirdnest.com/partners"><img src="/images/songbird_button_headphones.png" border="0" alt="Get Songbird" style="padding-right:35px;" /></a>\n									<a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx"><img src="/images/getIE7.gif" alt="get IE7" style="padding-bottom:10px;" /></a>\n								</div>\n								</div>\n						 	</div>\n					</div>';
document.getElementById("unsupDLContent").style.display="block";
break
}}function getDefaultDownloadUrl(){var C="";
var E="";
var F="";
var A=validBrowserCheck();
var B=document.domain;
switch(A){case"supportedFF":case"supportedFlock":E="http://ffdownload.";
F="/me.dium.xpi";
break;
case"unsupportedFF":case"unsupportedIE":break;
case"supportedIE":E="http://iedownload.";
F="/MediumIEAddOnSetup.msi";
break;
case"supportedIE8":var D;
switch(B){case"me.dium.com":case"www.me.dium.com":case"blogme.dium.com":D="me.dium.com";
break;
case"blogme.stage01.getmedium.com":case"www.stage01.getmedium.com":D="www.stage01.getmedium.com";
break;
case"www.qa.getmedium.com":case"blogme.qa.getmedium.com":D="www.qa.getmedium.com";
break;
case"www.dev.getmedium.com":case"www-devblog-www.getmedium.com":D="www.dev.getmedium.com";
break;
default:D="me.dium.com";
break
}return"https://"+D+"/ie8";
default:break
}switch(B){case"me.dium.com":case"www.me.dium.com":case"blogme.dium.com":C="getmedium.com";
break;
case"blogme.stage01.getmedium.com":case"www.stage01.getmedium.com":C="stage01.getmedium.com";
break;
case"www.qa.getmedium.com":case"blogme.qa.getmedium.com":C="qa.getmedium.com";
break;
case"www.dev.getmedium.com":case"www-devblog-www.getmedium.com":C="www.dev.getmedium.com/download/";
E="http://";
break;
default:C="getmedium.com";
break
}return E+C+F
}function closeDLContent(A){elem=document.getElementById(A);
elem.style.display="none";
document.getElementById("dlShield").style.display="none";
show("tutorial")
}function toggleNav(){toggle("navOn","navOff","headerNavList");
return false
}function limitSearchField(){var A=document.getElementById("searchParameter");
if(document.getElementById("searchBy").value==0){A.maxLength=16
}else{A.maxLength=100
}}function addEngine(B,C,A){if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function")){window.sidebar.addSearchEngine("http://www.leo.org/dict/plugins/"+B+".src","http://www.leo.org/dict/plugins/"+B+"."+C,B,A);
alert("Download completed")
}else{errorMsg(B,C,A)
}};