// JavaScript Document


var veerServerBasePath,veerFlontServerBasePath,contentAreaWidth,styles,zoomText,glyphsUnavailableText;var lastText="";var lastSize="";function start(serverBasePath,flontServerBasePath,stylesId,zooming,width)
{veerServerBasePath=serverBasePath;veerFlontServerBasePath=flontServerBasePath;contentAreaWidth=width;styles=getElement(stylesId);zoomText=zooming;switch(window.location.hash){case"#specimen":showPoster();break;case"#flont":showFlont();break;case"#characters":showGlyphs();break;case"#about":showInfo();break;default:showPoster();break;}
return;}
function showPoster()
{pauseGlass();setElementClass(document.body,'posterSelected');showElement('posterPanel');hideElement('flontPanel');hideElement('glyphsPanel');hideElement('infoPanel');markTab("specimen");}
function showFlont()
{pauseGlass();setElementClass(document.body,'flontSelected');hideElement('posterPanel');showElement('flontPanel');hideElement('glyphsPanel');hideElement('infoPanel');markTab("flont");}
function showGlyphs(fontId)
{setElementClass(document.body,'glyphsSelected');var glyphsPanel=getElement('glyphsPanel');if(glyphsPanel&&glyphsPanel.style&&glyphsPanel.style.overflow!="visible"&&contentAreaWidth)
{glyphsPanel.style.width=contentAreaWidth+"px";glyphsPanel.style.overflow="visible";}
hideElement('posterPanel');hideElement('flontPanel');showElement('glyphsPanel');hideElement('infoPanel');if(isMochiKitCapable()){if(styles)
{if(!styles.onchange)
{styles.onchange=changeGlyphMapHandler;}
if(!Glass.ready)
{Glass.start(veerServerBasePath,veerFlontServerBasePath,zoomText);MochiKit.DOM.addToCallStack(window,"onresize",Glass.windowResizedHandler);}
Glass.resume();if(fontId&&isFinite(fontId))
{for(var i=0;i<styles.length;i++)
{if(styles.options[i].value==fontId)
{styles.options[i].selected=true;}}}
changeGlyphMapHandler();}else{showElement('glyphsPanel');}
markTab("characters");}}
function changeGlyphMapHandler()
{Glass.loadMap(styles.options[styles.selectedIndex].value);}
function showInfo()
{pauseGlass();setElementClass(document.body,'infoSelected');hideElement('posterPanel');hideElement('flontPanel');hideElement('glyphsPanel');showElement('infoPanel');markTab("about");}
function markTab(tabName)
{if(navigator.platform.substring(0,3)=="Mac"&&navigator.appName=="Microsoft Internet Explorer"||navigator.userAgent.indexOf("Opera")!=-1){return;}
if((window.location.hash==""&&tabName=="specimen")||window.location.hash=="#"+tabName){return;}
var l=window.location;l.replace(l.protocol+"//"+l.hostname+l.pathname+l.search+"#"+tabName);}
function isMochiKitCapable(){return(Function.apply&&MochiKit);}
function pauseGlass(){if(isMochiKitCapable()){Glass.pause();}}
if(!isMochiKitCapable()){this.showElement=function(element){element=getElement(element);element.style.display="block";};this.hideElement=function(element){element=getElement(element);element.style.display="none";};this.setElementClass=function(element,className){element=getElement(element);element.className=className;};this.getElement=function(name){if(typeof(name)=='string'){return document.getElementById(name);}else{return name;}};}