var templateURL="/templates/templates.xml";
var site="schmap";
var requestT000Exceptions=true;
var defaultLogoPath="/images/guidelogos/";
var printLogoPath="/images/guidelogosgif/";
var printMapIconPath="mapiconsgif";
var colorApply=false;
var loadingGap=0.1;
var userPlaceIconsPath="/images/minitemplate/usericons/";
var trackPage=true;
function Config(_1){
if(_1){
this.items=_1;
}else{
this.items={};
}
}
Config.prototype.get=function(_2){
return this.items[_2];
};
Config.prototype.set=function(_3,_4){
this.items[_3]=_4;
};
Config.prototype.update=function(_5){
MochiKit.Base.update(this.items,_5);
};
config=new Config();
config.set("localInfoUrl","/webapp/servlet/locallatlong?guide=yes");
config.set("contentNegotiation",true);
config.set("negotiateSuffix",".var");
var BrowserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"An unknown browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";
this.OS=this.searchString(this.dataOS)||"an unknown OS";
},searchString:function(_6){
for(var i=0;i<_6.length;i++){
var _8=_6[i].string;
var _9=_6[i].prop;
this.versionSearchString=_6[i].versionSearch||_6[i].identity;
if(_8){
if(_8.indexOf(_6[i].subString)!=-1){
return _6[i].identity;
}
}else{
if(_9){
return _6[i].identity;
}
}
}
},searchVersion:function(_a){
var _b=_a.indexOf(this.versionSearchString);
if(_b==-1){
return;
}
return parseFloat(_a.substring(_b+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"},{string:navigator.platform,subString:"iPhone",identity:"iPhone"},{string:navigator.platform,subString:"iPod",identity:"iPod"}]};
BrowserDetect.init();
function getHashParams(){
var _c=document.location.hash;
var _d=parseQueryString(_c.substr(1));
return _d;
}
function getSearchParams(){
var _e=document.location.search;
var _f=parseQueryString(_e.substr(1));
return _f;
}
function stopPropagation(_10){
if(_10.stopPropagation){
_10.stopPropagation();
}else{
_10.cancelBubble=true;
}
}
function preventDefault(_11){
if(_11.preventDefault){
_11.preventDefault();
}else{
_11.returnValue=false;
}
}
function replaceall(str,s1,s2){
while(str.indexOf(s1)!=-1){
str=str.replace(s1,s2);
}
return str;
}
var whitespace="\n\r\t ";
var dataType={};
var valueType={};
var xPathCompileSupport=(typeof (XPathResult)!="undefined");
if(xPathCompileSupport){
dataType={"string":XPathResult.STRING_TYPE,"any":XPathResult.ANY_TYPE,"boolean":XPathResult.BOOLEAN_TYPE,"number":XPathResult.NUMBER_TYPE};
valueType={"string":"stringValue","boolean":"booleanValue","number":"numberValue"};
}
function XmlDoc(xml){
this.xml=xml;
this.access=new XMLAccess();
}
XmlDoc.prototype.getElements=function(ns,_17){
var _18=partial(this.access.getElementsByTagNameNS,this.xml);
return _18(ns,_17);
};
function XMLAccess(){
}
function xmlLoad(url,_1a){
var d=doXHR(url,{mimeType:"text/xml",Accept:"text/xml"});
d.addCallback(_1a);
d.addErrback(errorHandler);
}
function xmlSyncLoad(uri){
var req=getXMLHttpRequest();
req.open("GET",uri,false);
req.send(null);
var _1e=req.status;
if(_1e==200||_1e==201||_1e==204||_1e==304||_1e==1223){
return getDocFromText(req.responseText);
}
return "";
}
function getDocFromText(_1f){
if(window.ActiveXObject){
var doc=new ActiveXObject("Microsoft.XMLDOM");
doc.async="false";
doc.loadXML(_1f);
}else{
var _21=new DOMParser();
var doc=_21.parseFromString(_1f,"text/xml");
}
var _22=doc.documentElement;
return _22;
}
function errorHandler(err){
logError("my error is:",err);
if(err.fileName&&err.lineNumber){
logError(err+" on "+err.fileName+":"+err.lineNumber);
}else{
logError(repr(err)+":"+err.message);
}
}
XMLAccess.prototype.setXmlDoc=function(xml){
this.xmlDomDoc=xml;
};
XMLAccess.prototype.getElementsByTagNameNS=function(_25,ns,_27){
try{
var _28=_25.selectNodes(".//"+ns+":"+_27);
return _28;
}
catch(e){
}
try{
var _28=this.getNodes(NS[ns],_27);
return _28;
}
catch(e){
logError("no getElementNS!");
return [];
}
};
XMLAccess.prototype.getAttributeNS=function(_29,ns,_2b){
if(_29.getAttributeNS){
var _2c=_29.getAttributeNS(NS[ns],_2b);
}else{
if(ns!="none"){
var _2c=_29.getAttribute(ns+":"+_2b);
}else{
var _2c=_29.getAttribute(_2b);
}
}
return _2c;
};
XMLAccess.prototype.getAttributeNode=function(_2d,_2e){
var _2f=_2d.getAttribute(_2e);
return _2f;
};
XMLAccess.prototype.xGetAttrNS=function(_30,_31,ns,_33){
var nod=this.getFirstChild(_30,_31);
return this.getAttributeNS(nod,ns,_33);
};
XMLAccess.prototype.getNodes=function(_35,_36,_37){
var _38;
if(typeof (_35.selectNodes)!="undefined"){
_36=replaceall(_36,"none:","");
_38=_35.selectNodes(_36);
}else{
if(xPathCompileSupport){
if(typeof (XPathResult.QueryInterface)=="undefined"){
_36=replaceall(_36,"none:","");
}
if(BrowserDetect.browser=="Firefox"){
_38=this.xmlDomDoc.evaluate(_36,_35,getNS,dataType[_37],null);
}else{
_38=document.evaluate(_36,_35,getNS,dataType[_37],null);
}
}else{
_38=simpleGetNodes(_35,_36);
}
}
return _38;
};
XMLAccess.prototype.getChildren=function(_39,_3a){
var _3b=this.getChildrenArray(_39,_3a);
return iter(_3b);
};
XMLAccess.prototype.getChildNodes=function(_3c,_3d){
if(typeof (_3c.selectNodes)!="undefined"){
var _3e=xmlAccess.getChildrenArray(_3c,_3d);
}else{
var _3e=xmlAccess.getChildren(_3c,_3d);
}
return _3e;
};
XMLAccess.prototype.getChildrenArray=function(_3f,_40){
var _41=this.getNodes(_3f,_40,"any");
return _41;
};
XMLAccess.prototype.getSons=function(_42,_43){
var _44=[];
if(typeof (_42.selectNodes)=="undefined"&&!xPathCompileSupport){
_44=_42.childNodes;
_44=ifilter(function(_45){
return _45.nodeType=="1";
},_44);
}else{
_44=this.getNodes(_42,_43,"any");
}
return iter(_44);
};
XMLAccess.prototype.getText=function(_46){
var _47;
if(_46.text){
_47=_46.text;
}else{
if(_46.textContent){
_47=_46.textContent;
}else{
if(_46.childNodes.length>0){
_47=_46.childNodes[0].nodeValue;
}
}
}
if(isUndefinedOrNull(_47)){
_47="";
}
return _47;
};
XMLAccess.prototype.getCData=function(_48){
if(_48.childNodes.length){
var _49=_48.childNodes[0];
if(_49.nodeName=="#cdata-section"){
return _49.data;
}
}
return "";
};
XMLAccess.prototype.getSingleChildText=function(_4a,_4b){
var _4a=this.getNodes(_4a,_4b,"string");
if(_4a){
if(_4a.length){
var _4c=_4a[0];
if(_4c.text){
return _4c.text;
}else{
if(_4c.hasChildNodes()){
return _4c.childNodes[0].nodeValue;
}
}
}else{
if(xPathCompileSupport){
return _4a[valueType["string"]];
}
}
}
return "";
};
XMLAccess.prototype.getFirstChild=function(_4d,_4e,_4f){
if(!_4f){
_4f="any";
}
var _50=this.getNodes(_4d,_4e,_4f);
try{
if(_50){
return iter(_50).next();
}
}
catch(e){
}
return null;
};
function getNS(ns){
return NS[ns];
}
function simpleGetNodes(_52,_53){
var _54=_53.split("/");
var _55;
var _56=[_52];
var _57=_54.length;
for(var i=0;i<_57;i++){
var _59=_54[i];
if(!_59){
continue;
}
var _5a=_59.split(":");
var ns="";
if(_5a.length==2){
var ns=getNS(_5a[0]);
var _5c=_5a[1];
}else{
var _5c=_5a[0];
}
if(_56.length>0){
_56=_56[0].getElementsByTagNameNS(ns,_5c);
}
if(!_56){
return _56;
}
}
return _56;
}
function isEmpty(str){
return (str==null)||(str.length==0);
}
function trim(_5e,_5f,_60){
if(isEmpty(_5e)){
return "";
}
if(_5f==null){
_5f=true;
}
if(_60==null){
_60=true;
}
var _61=0;
var _62=0;
var i=0;
var k=0;
if(_5f==true){
while((i<_5e.length)&&(whitespace.indexOf(_5e.charAt(i++))!=-1)){
_61++;
}
}
if(_60==true){
k=_5e.length-1;
while((k>=_61)&&(whitespace.indexOf(_5e.charAt(k--))!=-1)){
_62++;
}
}
return _5e.substring(_61,_5e.length-_62);
}
function httpFormPost(url,_66){
var _67=getXMLHttpRequest();
_67.open("POST",url,true);
_67.onreadystatechange=function(_68){
if(_67.readyState==4){
logDebug("succeed!");
}
console.log("resp",_68);
};
_67.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_67.send(_66);
}
var b_version=navigator.appVersion;
var isIE6=b_version.search(/MSIE 6/i)!=-1;
var isIE7=b_version.search(/MSIE 7/i)!=-1;
var isSafari20=b_version.search(/412.2.2/i)!=-1;
var isMacintosh=b_version.search(/Macintosh/i)!=-1;
var isSafari3=b_version.search(/applewebkit\/5/i)!=-1;
var isSafari=b_version.search(/applewebkit/i)!=-1;
var isSafari2=isSafari&&!isSafari3;
var IEquirks=b_version.search(/MSIE/i)!=-1;
var NS={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",dc:"http://purl.org/dc/elements/1.1/",cc:"http://web.resource.org/cc/",vcard:"http://www.w3.org/2001/vcard-rdf/3.0#",georss:"http://www.georss.org/georss/",schmap:"http://www.schmap.com/xml/schmapplet#",findme:"http://www.schmap.com/xml/findme#",atom:"http://www.w3.org/2005/Atom",none:""};
function idiv(a,b){
return (a-(a%b))/b;
}
function elementOverlapsV(_6b,top,_6d){
var pos=getElementPosition(_6b);
if(pos.y>_6d){
return false;
}
var dim=getElementDimensions(_6b);
if((pos.y+dim.h)<top){
return false;
}
return true;
}
function logException(err,_71){
_71=_71||"";
if(err.fileName&&err.lineNumber){
logError(_71+err+" on "+err.fileName+":"+err.lineNumber);
}else{
logError(_71+repr(err)+":"+err.message);
}
}
function err_logging(f){
return function(){
try{
f.apply(this,arguments);
}
catch(err){
logException(err);
}
};
}
function dataFailure(_73,err){
alert("There was an error loading the "+_73+".  Please try again in a few minutes.");
}
function PNG_html(_75){
var img=new StringBuffer();
var src=_75.src;
if(IEquirks){
_75.src="/common/spacer.png";
}
img.append("<img ");
if(_75.id){
img.append("id=\"").append(_75.id).append("\" ");
}
if(_75.thisClass){
img.append("class=\"").append(_75.thisClass).append("\" ");
}
img.append("src=\"").append(_75.src);
img.append("\" width=\"").append(_75.width).append("\" height=\"").append(_75.height).append("\"/>");
if(IEquirks){
var img=new StringBuffer();
img.append("<IMG ");
if(_75.id){
img.append("id=\"").append(_75.id).append("\" ");
}
img.append(" style=\"").append("FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='");
img.append(src).append("',sizingMethod='scale'); WIDTH: ").append(_75.width);
img.append("px; HEIGHT: ").append(_75.height).append("px");
if(_75.thisClass){
img.append("\" class=\"").append(_75.thisClass);
}
img.append("\" src=\"/images/pageicons/spacer.png\">");
}
return img.toString();
}
function PNG(_78){
var src=_78.src;
if(schmapplet.IEquirks){
_78.src="/images/pageicons/spacer.png";
}
img=MochiKit.DOM.IMG(_78);
var _7a=new StringBuffer();
if(schmapplet.IEquirks){
setElementDimensions(img,{h:_78.height,w:_78.width});
_7a.append("progid:DXImageTransform.Microsoft.").append("AlphaImageLoader(src='").append(src).append("',sizingMethod='scale')");
img.style.filter=_7a.toString();
}
return img;
}
function PNGck(_7b){
var src=_7b.src;
var _7d=(src.toLowerCase().search(".png")!==-1);
if(schmapplet.IEquirks&&_7d){
_7b.src="/images/pageicons/spacer.png";
}
img=MochiKit.DOM.IMG({src:_7b.src});
var _7e=new StringBuffer();
if(schmapplet.IEquirks&&_7d){
setElementDimensions(img,{h:_7b.height,w:_7b.width});
_7e.append("progid:DXImageTransform.Microsoft.").append("AlphaImageLoader(src='").append(src).append("',sizingMethod='scale')");
img.style.filter=_7e.toString();
}
return img;
}
function setTextTrimmed(_7f,_80,_81){
_7f=$(_7f);
_7f.title=_80;
replaceChildNodes(_7f,_80);
_80+="...";
while(_7f.scrollWidth>_81){
_80=_80.substr(0,_80.length-8)+"...";
replaceChildNodes(_7f,_80);
}
}
function PlaceObj(_82){
if(_82){
this.id=xmlAccess.getAttributeNS(_82,"rdf","ID");
this.name=xmlAccess.getSingleChildText(_82,"dc:title");
this.sdesc=xmlAccess.getSingleChildText(_82,"dc:description");
var _83=xmlAccess.getFirstChild(_82,"schmap:text");
this.ldesc=xmlAccess.getCData(_83);
if(this.ldesc==""){
this.ldesc=xmlAccess.getSingleChildText(_82,"schmap:text");
}
if(this.ldesc!=""){
schmapplet.hasStats=true;
}
this.schmapIcon=xmlAccess.getSingleChildText(_82,"schmap:icon");
this.normalMapIcon=xmlAccess.getSingleChildText(_82,"schmap:icon");
this.rating=Number(xmlAccess.getSingleChildText(_82,"schmap:rating"));
this.featured=Number(xmlAccess.getSingleChildText(_82,"schmap:featured"));
this.email=xmlAccess.getSingleChildText(_82,"vcard:EMAIL");
this.stickyPlaceType=0;
var _84=xmlAccess.getFirstChild(_82,"schmap:StickyPlace");
if(_84!=null){
this.stickyPlaceType=1;
}
var _85=xmlAccess.getSingleChildText(_82,"vcard:URL");
url=_85.split(" ");
if(url.length==1){
this.url=url[0];
this.urlText=this.url.replace(/^.*?\/\/(.+)$/,"$1").replace(/^(.*)\/+$/,"$1");
this.extra_url=false;
}else{
this.url=url[url.length-1];
this.urlText=_85.replace(this.url,"");
this.extra_url=true;
}
this.tel=[];
this.url_munged=this.url.replace(/^.*?\/\/(.+)$/,"$1").replace(/^(.*)\/+$/,"$1");
var _86=xmlAccess.getChildren(_82,"vcard:TEL");
try{
do{
var _87=_86.next();
var _88=xmlAccess.getSingleChildText(_87,"rdf:value");
if(_88!=""){
this.tel.push(_88);
}
}while(_87);
}
catch(e){
}
var _89=xmlAccess.getChildren(_82,"schmap:additionalLink1");
this.additonalLink1="";
try{
var _8a=_89.next();
}
catch(e){
}
if(_8a){
this.additonalLink1={};
var _8b=xmlAccess.getSingleChildText(_8a,"vcard:label");
var _88=xmlAccess.getSingleChildText(_8a,"rdf:value");
this.additonalLink1.name=_8b;
this.additonalLink1.linkValue=_88;
}
this.geo=xmlAccess.getSingleChildText(_82,"vcard:GEO").split(/ /);
this.addr1=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:Street");
this.addr2=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:Extadd");
this.city=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:Locality");
this.staduimDetails=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:StaduimDetails");
this.region=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:Region");
this.zip=xmlAccess.getSingleChildText(_82,"vcard:ADR/vcard:Pcode");
}
}
function scalify(_8c){
if(_8c>=450){
return Math.round(_8c/100)/10+"K";
}else{
return Math.round(_8c/100)*100;
}
}
function parse_colorset(_8d){
ctext=_8d.replace(/\s/g,"");
colors=[null];
while(ctext){
colors.push(ctext.substring(0,6));
ctext=ctext.substring(6);
}
return colors;
}
function apply_colorset(_8e,_8f,_90){
while(_8e.length<19){
_8e.push(null);
}
var _91=_8f.length;
var _92=document.styleSheets.length;
for(var i=0;i<_92;i++){
var _94=document.styleSheets[i];
var s=_94;
if(!s.href.match(_90)){
continue;
}
var _96=s.cssRules||s.rules;
if(!schmapplet.stylesheets){
schmapplet.stylesheets=_96;
}
var _97=_96.length;
for(var i2=0;i2<_97;i2++){
var r=_96[i2];
var st=r.selectorText;
for(var i3=0;i3<_91;i3++){
var crs=_8f[i3];
var _9d=crs[0];
if(!st.match(_9d)){
continue;
}
crsLen=crs.length;
for(var i4=1;i4<crsLen;i4++){
var cr=crs[i4];
var cr0=cr[0];
var cr1=cr[1];
var _a2=r.style;
if(_a2[cr0]&&_8e[cr1]){
try{
_a2[cr0]="#"+_8e[cr1];
}
catch(e){
logDebug("colorset: failed to apply",crs[0],cr[0],repr(_8e[cr[1]]));
}
}
}
}
}
break;
}
}
function addScript(url,_a4,_a5,_a6){
var s=document.createElement("script");
s.type="text/javascript";
s.language="javascript";
s.src=url;
if(_a4){
s.onload=partial(_a4,_a5,_a6);
s.onreadystatechange=function(){
if(this.readyState=="loaded"||this.readyState=="complete"){
_a4(_a5,_a6);
}
};
}
logDebug("adding script:",url);
appendChildNodes(document.getElementsByTagName("head")[0],s);
if(isSafari2&&_a4){
callLater(3,partial(_a4,_a5,_a6));
}
}
function getCsurrentGMapUrl(){
return "http://maps.google.com/maps?file=api&v=2.151&key="+google_api_key+"&async=2&callback=loadedGMap";
}
function getCurrentGMapUrl(){
var map=map_api_order[0];
if(map=="Google"||map=="Schmap"||map=="Cgoogle"){
return "http://maps.google.com/maps?file=api&v=2.151&key="+google_api_key+"&async=2&callback=loadedGMap";
}else{
return map_api_src;
}
}
function importGMapUrl(){
addScript(getCurrentGMapUrl());
}
function loadedGMap(){
addScript("http://"+document.location.host+"/common/lib/MochiMaps__Google.js");
}
function loadedMap(){
addScript("http://"+document.location.host+"/common/lib/MochiMaps__"+map_api_order[0]+".js");
}
boxManager={boxes:[],register:function(box){
this.boxes.push(box);
},updateAll:function(_aa){
}};
reactor={boxManager:boxManager,respond:function(_ab){
}};
function Nexus(pid){
this.placeid=arguments[0];
}
Nexus.prototype.equals=function(_ad){
if(this.placeid==_ad.placeid){
return 1;
}
return 0;
};
function Box(){
this.items={};
}
Box.prototype.getItem=function(){
};
Box.prototype.addItem=function(){
};
Box.prototype.onclick=function(){
};
Box.prototype.onmouseover=function(){
};
Box.prototype.onmouseout=function(){
};
function discardElement(_ae){
var _af=document.getElementById("IELeakGarbageBin");
if(!_af){
_af=document.createElement("DIV");
_af.id="IELeakGarbageBin";
_af.style.display="none";
document.body.appendChild(_af);
}
_af.appendChild(_ae);
_af.innerHTML="";
}
function StringBuffer(){
this.buffer=[];
}
StringBuffer.prototype.append=function(str){
this.buffer.push(str);
return this;
};
StringBuffer.prototype.toString=function(){
return this.buffer.join("");
};
StringBuffer.prototype.getLength=function(){
return this.buffer.length;
};
function concat(arr){
return arr.join("");
}
function clearMapLeaks(){
if(typeof (GUnload)!="undefined"){
GUnload();
}
}
function createMap(_b2){
var map;
var _b4=map_api_order.length;
for(var i=0;i<_b4;i++){
var _b6=map_api_order[i];
MochiKit.Maps=MochiKit["Maps__"+_b6];
try{
map=new MochiKit.Maps.Map(_b2);
break;
}
catch(e){
replaceChildNodes(_b2);
}
}
return map;
}
function makeIcons(_b7,map,_b9,_ba){
if(!_ba){
_ba=schmapplet.places.length;
}
if(!_b9){
_b9=0;
}
if(!map){
map=schmapplet.map;
}
if(!_b7){
_b7=MochiKit.Maps;
}
var _bb=_b7;
var _bc="/images/minitemplate/usericons/";
if(schmapplet.nextIconToMake===undefined||schmapplet.nextIconToMake===null||isNaN(schmapplet.nextIconToMake)){
logDebug("making icons");
schmapplet.nextIconToMake=schmapplet.places.length-1;
}
place=schmapplet.places[schmapplet.nextIconToMake];
mapIconIndex=map.provider+place.schmapIcon;
var _bd=schmapplet.mapIcons[mapIconIndex];
var _be;
if(typeof (_bd)!="undefined"&&_bd!==undefined){
_be=_bd[1];
_bd=_bd[0];
}else{
var _bf,_c0;
var _c1=[];
var _c2=[];
if(place.stickyPlaceType==2){
_bf=_bc+place.schmapIcon+"-over.png";
_c0=_bc+place.schmapIcon+"-normal.png";
_c1[0]=Number(schmapplet.uplace.id.substr(0,2));
_c1[1]=Number(schmapplet.uplace.id.substr(2,2));
_c2[0]=_c1[0];
_c2[1]=_c1[1];
}else{
_bf=mapiconspath+place.schmapIcon+"-over.png";
_c0=mapiconspath+place.normalMapIcon+"-normal.png";
_c1[0]=settings.OverIconSize[0];
_c1[1]=settings.OverIconSize[1];
_c2[0]=settings.NormalIconSize[0];
_c2[1]=settings.NormalIconSize[1];
}
_be=new _bb.Icon(_bf,new MochiKit.Style.Dimensions(_c1[0],_c1[1]),new MochiKit.Style.Coordinates(schmapplet.overAnchorX,schmapplet.overAnchorY));
_bd=new _bb.Icon(_c0,new MochiKit.Style.Dimensions(_c2[0],_c2[1]),new MochiKit.Style.Coordinates(schmapplet.normalAnchorX,schmapplet.normalAnchorY));
schmapplet.mapIcons[mapIconIndex]=[_bd,_be];
}
if((place.geo[0].toString().toUpperCase()=="NONE")||(place.geo[1].toString().toUpperCase()=="NONE")){
place.geocode=place.marker=place.markerbig=null;
}else{
place.geocode=new _bb.Point(place.geo[0],place.geo[1]);
var _c3=new _bb.Marker(place.geocode,_be);
var _c4=new _bb.Marker(place.geocode,_bd);
_c3.placeid=place.id;
_c4.placeid=place.id;
map.addItem(_c4);
if(place.marker){
place.Gmarker=_c4;
place.Gmarkerbig=_c3;
place.Gmarker.hide();
place.connectGMarkerSignals();
}else{
place.marker=_c4;
place.markerbig=_c3;
place.connectMarkerSignals();
}
}
if(schmapplet.nextIconToMake--&&!_b9){
if(schmapplet.nextIconToMake%10){
return makeIcons(_bb,map);
}else{
callLater(0.001,partial(makeIcons,_bb,map));
}
}else{
callLater(1,function(){
var i=_ba;
while(_b9!==i--){
if(schmapplet.places[i].Gmarkerbig){
map.addItem(schmapplet.places[i].Gmarkerbig);
schmapplet.places[i].Gmarkerbig.hide();
}else{
if(schmapplet.places[i].markerbig){
map.addItem(schmapplet.places[i].markerbig);
schmapplet.places[i].markerbig.hide();
}
}
}
schmapplet.marker=true;
logTime("end of making icons");
return postMakeIcons2();
});
return postMakeIcons1(map);
}
}
var logTimeMessage="";
function logTime(_c6,_c7){
var _c8=schmapplet.lastLoggedTime;
schmapplet.lastLoggedTime=new Date();
if(_c8===undefined){
var _c9=_c6+"-- counting time";
}else{
var _c9=_c6+"--"+(schmapplet.lastLoggedTime-_c8)/1000+"seconds";
}
_c9=_c9+"<br/>";
logTimeMessage+=_c9;
if(_c7){
try{
if(parent.document.getElementById("logtime")){
parent.document.getElementById("logtime").innerHTML=logTimeMessage;
}
}
catch(e){
}
}
}
function unshiftElement(arr,obj){
if(!obj){
return arr;
}
if(arr.length<2){
return arr;
}
if(arr[0]==obj){
return arr;
}
var ix=1;
while(true){
if(arr[ix++]==obj){
arr.splice(ix-1,1);
break;
}
}
arr.unshift(obj);
return arr;
}
function errLog(err){
logError("my error is:",err);
if(err.fileName&&err.lineNumber){
var _ce=err+" on "+err.fileName+":"+err.lineNumber;
}else{
var _ce=repr(err)+":"+err.message;
}
logError(_ce);
}
function analyticsConnect(_cf,_d0,_d1,_d2,_d3){
connect(_cf,_d0,_d1);
if(trackPage&&(!_d2.isRegistered||(_d3!=null))){
var _d4;
if(schmapplet.si&&typeof (schmapplet.si)!="undefined"){
_d4=_d2.text.replace("%si%",schmapplet.si);
}else{
_d4=_d2.text.replace("%si%","none");
}
connect(_cf,_d0,function(){
pageTracker._trackPageview(_d4);
});
_d2.isRegistered=true;
}
}
var schmapplet={_loading:true,selected:0,view:"map",IEquirks:b_version.search(/MSIE/i)!=-1,cycleTime:6,mapIcons:{},placesById:{},_placesCount:0};
logTime("mini starting load this page");
var cycling_d=null;
var flash_d=null;
var Map_object={};
var autoPlaying=true;
var autoPlayPaused=false;
var autoPlayStopped=false;
var autoPausedByParent=false;
var inMapRegion=false;
var settings={};
var flashTime=0.5;
var Placeall=[];
var colorset;
var xmlAccess=new XMLAccess();
var num=0;
var DefaultIconCode="D000";
var mapiconspath="";
var pageiconpath="";
var beforSetupCalled=false;
var PlaceId="";
var xmlHttpPhoto;
var gmapTime=0.1;
var showed=false;
var guide_hotswap_showed=false;
var section_hotswap_showed=false;
var isPhotoView=false;
var isStatsView=false;
var photo_cc=null;
var subtitle="";
var initPlaceId="";
var sectionHtml="";
var guideHtml="";
var topleft;
var bottomright;
var loadingNewSchmapplet=false;
var loadingNewMap=false;
var tabs=[];
var tabViews=["map","details","photos","stats","schedule"];
var minTemplate=true;
var schmappletBorder=3;
var Panelborder=4;
var stripBackgroundColor=15;
var colorset_template;
var initialized=templateChanged=0;
var citycode;
var placesChecked=1;
var loadNewPlace=false;
var isPlaceOnly=false;
var noPhotosAtAll=true;
var photoTabSN=-1;
var isFishined=0;
var countriesMenu={};
var navMenu={};
var sectionLoaded=0;
var guideLoaded=0;
var guideSrcXml="/common/minicitiesmenu.html?/xml/mininavmenu.xml&Countries";
var sectionSrcXml;
var isGuideSchmapplet=false;
var loadSchmapPlacesFlag=true;
var showMyPlace=true;
var isCreatePhoto=false;
var changedUrl="";
var loadingEmptyGuide=false;
var truncationNeeded=1;
var subTitleFromPlaces;
var hasTwoThumsInPlaceStrip=false;
var newDefaultDetailsStripColor="FFFFFF";
var defaultSchmapYellowColor="FAF5BB";
var fixedPlace=null;
schmapplet.hasStats=false;
var unbreakIERun=0;
schmapplet.customizePage="/templates/customize.html";
schmapplet.frameWidth=200;
schmapplet.frameHeight=380;
var guide_url;
var ShowMenus=null;
var showMenusFromUrl=null;
var showMenusFromMeta=null;
var showTwoMenus=[1,1];
var autoplayUrl=null;
var zoomLevel;
schmapplet.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var showingOrigMap=false;
var mapLogo=[];
var getThisWidgetPauseTimerId=0;
var iframeCode="";
var removeLinks=false;
var analyticsHooks={"widgetImpression":{text:"/%si%",isRegistered:false},"getThisWidget":{text:"/events/%si%/mouseover/getthiswidget",isRegistered:false},"getthiswidget5s":{text:"/events/%si%/mouseover/getthiswidget5s",isRegistered:false},"belowTextClick":{text:"/events/%si%/click/outsidetext",isRegistered:false},"belowTextOver":{text:"/events/%si%/mouseover/outsidetext",isRegistered:false},"copyCodeLeft":{text:"/events/%si%/click/left/codetocopy",isRegistered:false},"copyCodeRight":{text:"/events/%si%/click/right/codetocopy",isRegistered:false},"customizeLink":{text:"/events/%si%/click/customize",isRegistered:false},"placeGameLink":{text:"/events/%si%/follow/tabs/place",isRegistered:false},"schedGameLink":{text:"/events/%si%/follow/tabs/sched",isRegistered:false},"statsTabClick":{text:"/events/%si%/click/tabs/stats",isRegistered:false},"schedTabClick":{text:"/events/%si%/click/tabs/sched",isRegistered:false},"mapTabClick":{text:"/events/%si%/click/tabs/map",isRegistered:false},"mapIconClick":{text:"/events/%si%/click/mapicon",isRegistered:false},"topNavOver":{text:"/events/%si%/mouseover/menus/topmenu",isRegistered:false},"topNavClick":{text:"/events/%si%/follow/menus/topmenu",isRegistered:false},"secondNavOver":{text:"/events/%si%/mouseover/menus/secondmenu",isRegistered:false},"secondNavClick":{text:"/events/%si%/follow/menus/secondmenu",isRegistered:false},"textZoom":{text:"/events/%si%/click/zoomtostadiumtext",isRegistered:false},"mapZoom":{text:"/events/%si%/click/zoomtostadiummap",isRegistered:false},"forward":{text:"/events/%si%/click/buttons/forward",isRegistered:false},"back":{text:"/events/%si%/click/buttons/back",isRegistered:false}};
function tabOne(){
this.tabType="";
this.tabRealView="";
this.tabText="";
this.tabDiv=null;
this.displayedObj=[];
}
function Photo(_d5){
this.abpath=_d5["abpath"];
this.path=_d5["path"];
this.link=_d5["link"];
this.licenseurl=_d5["licenseurl"];
this.licensecode=_d5["licensecode"];
this.username=_d5["username"];
}
function createUserPlace(_d6){
var _d7;
try{
_d7=new PlaceObj();
}
catch(e){
}
var m=_d6.match(/(.[^\|]+)[\|](.[^\|]+)[\|](.[^\|]+)[\|](.[^\|]+)/i);
_d7.id=m[1];
_d7.name=m[3];
_d7.sdesc=m[4];
_d7.ldesc="";
_d7.schmapIcon=m[1];
_d7.normalMapIcon=m[1];
_d7.geo=m[2].split(/,/);
logDebug("place.geo:"+_d7.geo);
_d7.photo_objs=[];
_d7.stickyPlaceType=2;
_d7.zoomedIn=false;
return _d7;
}
function setCurrentCounter(num,_da){
if(num==""){
$("counter-current").innerHTML=" ";
}else{
if(typeof (settings.PlaceNumerText)!="undefined"&&settings.PlaceNumerText.length>0){
if(typeof (_da)=="undefined"||typeof (_da)=="object"){
_da=$("view-panel").clientWidth;
}
if(_da+6<=160&&tabs.length>=3){
$("counter-current").innerHTML="#"+num;
return;
}
var _db=settings.PlaceNumerText.replace("%1",num);
_db=_db.replace("%2",schmapplet.places.length);
$("counter-current").innerHTML=_db;
}else{
var _dc=num+" of  "+schmapplet.places.length;
$("counter-current").innerHTML=_dc;
}
}
}
function createPlace(_dd){
var _de=0;
var _df=new PlaceObj(_dd);
var _e0;
var _e1;
var _e2;
var _e3;
var _e4;
var _e5="";
if(_df.schmapIcon.length==0){
_df.schmapIcon=DefaultIconCode;
}
if(_df.normalMapIcon.length==0){
_df.normalMapIcon=DefaultIconCode;
}
if(settings.UseFirstNormalIcon){
if(schmapplet.firstNormalIcon){
_df.normalMapIcon=schmapplet.firstNormalIcon;
}else{
schmapplet.firstNormalIcon=_df.normalMapIcon;
}
}
if((typeof (schmapplet.usingSTemplate)!="undefined")&&schmapplet.usingSTemplate==1){
if(_df.tel.length){
_df.sdesc=_df.tel[0];
if(_df.url!==""&&settings["StripTitleLink"]!=="true"){
var _e6=new StringBuffer();
if(schmapplet.disableLinks){
_e6.append(_df.sdesc);
}else{
_e6.append("<a href=\"").append(this.url).append("\" target=\"blank\">").append(_df.sdesc).append("</a>");
}
_df.sdesc=_e6;
}
}
}
var _e7=xmlAccess.getSingleChildText(_dd,"vcard:TEL/rdf:value");
_df.telnumber=_e7;
var _e8=xmlAccess.getSingleChildText(_dd,"vcard:ADR/vcard:Street");
_df.street=_e8;
_df.zoomedIn=false;
var _e9=xmlAccess.getChildren(_dd,"schmap:Photo");
if(!_e9){
_e9=[];
}
_df.photo_objs=[];
_df.photo_IMG=[];
_df.photo_thumb=IMG({src:""});
var _ea=[];
var _eb=true;
_df.zoomedIn=false;
forEach(_e9,function(_ec){
schmapplet.photos.push([_df,_de++]);
_e2=xmlAccess.getSingleChildText(_ec,"schmap:link");
_e1=xmlAccess.getSingleChildText(_ec,"dc:author");
var _ed=xmlAccess.getSingleChildText(_ec,"schmap:path");
var _ee=xmlAccess.getFirstChild(_ec,"dc:rights");
_e3="";
_e4="";
if(_ee){
_e3=xmlAccess.getSingleChildText(_ee,"cc:license");
var _ef=xmlAccess.getFirstChild(_ee,"cc:license");
_e3=xmlAccess.getAttributeNS(_ef,"rdf","resource");
_e4=xmlAccess.getSingleChildText(_ee,"dc:licensecode");
}
if(_e3==document.location.href){
_e3="";
}
if(_e4!=9){
noPhotosAtAll=false;
}
var _f0={"link":_e2,"username":_e1,"path":_ed,"licenseurl":_e3,"licensecode":_e4};
var _f1=new Photo(_f0);
if(_e4!=9){
_eb=false;
_df.photo_objs.push(_f1);
}else{
_ea.push(_f1);
}
});
_df.wcities_only=false;
_df.wcities_photos=[];
if(_eb){
_df.wcities_only=true;
_df.wcities_photos=_ea;
}
if(_df.photo_objs.length>0){
_e2=(_df.photo_objs[0].link);
_e3=(_df.photo_objs[0].licenseurl);
_e4=(_df.photo_objs[0].licensecode);
_e1=_df.photo_objs[0].username;
}else{
_e2="";
_e3="";
_e4="";
_e1="";
}
var _f2=IMG(null);
if(!_df.photo_objs.length){
_f2=PNG({src:settings.DefaultPlace,width:65,height:48});
}
if(schmapplet.sportsSchedule){
var reg=new regionObj();
if(schmapplet.pcodeArray.length==0){
schmapplet.pcodeArray.push(_df.zip);
schmapplet.regionArray.push(reg);
schmapplet.regionArray[0].regionArray.push(_df.region);
schmapplet.regionArray[0].placeNum.push(schmapplet._placesCount+1);
schmapplet.regionArray[0].url.push(_df.url);
schmapplet.regionArray[0].played.push(_df.tel.length);
}else{
for(i=0;i<schmapplet.pcodeArray.length;i++){
if(_df.zip==schmapplet.pcodeArray[i]){
schmapplet.regionArray[i].regionArray.push(_df.region);
schmapplet.regionArray[i].placeNum.push(schmapplet._placesCount+1);
schmapplet.regionArray[i].url.push(_df.url);
schmapplet.regionArray[i].played.push(_df.tel.length);
break;
}else{
if(i==(schmapplet.pcodeArray.length-1)){
schmapplet.pcodeArray.push(_df.zip);
schmapplet.regionArray.push(reg);
var k=i+1;
schmapplet.regionArray[k].regionArray.push(_df.region);
schmapplet.regionArray[k].placeNum.push(schmapplet._placesCount+1);
schmapplet.regionArray[k].url.push(_df.url);
schmapplet.regionArray[k].played.push(_df.tel.length);
break;
}
}
}
}
}
schmapplet.placesById[_df.id]=schmapplet._placesCount++;
return _df;
}
function repositionPlaceStripIcons(_f5){
try{
var _f6=document.body.clientHeight;
if($("schedule")&&$("scheduleborad")){
var _f7=parseInt($("schedule").style.bottom)-34;
var _f8=_f6-37-75-_f7-schmapplet.advertH;
if(isGuideSchmapplet){
setStyle("scheduleborad",{"height":_f8+"px"});
}else{
var _f8=_f6-75-37-_f7+$("subtitle-div").clientHeight-schmapplet.advertH;
setStyle("scheduleborad",{"height":_f8+"px"});
}
jugdeArticle();
}
if($("stats")){
var _f9=parseInt($("stats").style.bottom)-34;
setStyle("statsContent",{"height":_f6-37-75-_f9-schmapplet.advertH+"px"});
}
}
catch(e){
}
if(hasTwoThumsInPlaceStrip){
var _fa=1;
if(_f5<=194){
_fa=(((_f5/2)-30)/2)-12;
}else{
_fa=((_f5-194)/2)+21;
}
if(isIE6){
_fa=_fa/2;
}
var _fb=_fa+"px";
var _fc=_fa+"px";
setStyle("place-thumb-left",{"margin-left":_fb});
setStyle("place-thumb",{"margin-right":_fc});
}else{
setStyle("place-thumb-left",{"margin-left":""});
setStyle("place-thumb",{"margin-right":""});
}
logTime("repositionPlaceStripIcons, 3");
if(!isGuideSchmapplet){
var _fd=getElementDimensions("title-div").w-13;
var _fe=getTrunction("title",_fd,7);
$("title").innerHTML=_fe;
}
var _ff=getTrunction("TitleIn",_f5,9);
$("TitleIn").innerHTML=_ff;
if($("place-thumb-left").style.display!="none"){
var _100=getElementDimensions("place-thumb-left").w;
}else{
var _100=0;
}
if($("place-thumb").style.display!="none"){
var _101=getElementDimensions("place-thumb").w;
}else{
var _101=0;
}
var temW=_f5-_100-_101-5;
if(isIE6){
addElementClass("AddrLine1In","n-placeInfo");
var _103=11;
}else{
var _103=9;
}
var _ff=getTrunction("AddrLine1In",temW,_103);
$("AddrLine1In").innerHTML=_ff;
var _ff=getTrunction("ShortDescIn",temW,9);
$("ShortDescIn").innerHTML=_ff;
var _ff=getTrunction("PhoneNoIn",temW,9);
$("PhoneNoIn").innerHTML=_ff;
setCurrentCounter(schmapplet.selected+1,_f5);
if(schmapplet.sportsSchedule){
var _104=tabs.length;
for(var i=0;i<_104;i++){
var tab=tabs[i];
var _107="view-link"+i;
if(_f5<=180){
$(_107).style.fontSize="9px";
}else{
$(_107).style.fontSize="10px";
}
for(var j=0;j<tab.displayedObj.length;j++){
var _109=tab.displayedObj[j];
if(_f5+6<=_109.len){
tab.tabText=_109.name;
$(_107).innerHTML=tab.tabText;
break;
}
}
}
}
if(schmapplet.map&&schmapplet.map.repositionLogos){
schmapplet.map.repositionLogos();
}
}
function repositionPlaceStrip(_10a){
if(typeof (_10a)=="object"||typeof (_10a)=="undefined"||_10a==null){
_10a=$("view-panel").clientWidth;
}
repositionPlaceStripIcons(_10a);
jugdeArticle();
if($("scheduleborad")){
jugdescroll($("schedule"));
}
if(isStatsView){
jugdescroll($("stats"));
}
}
function regionObj(){
this.regionArray=[];
this.placeNum=[];
this.url=[];
this.played=[];
}
function makeThumbPhotos(){
if(schmapplet.photoMade){
return;
}
var _10b=$("place-info").clientWidth;
var _10c=settings.SchmappletHome.replace("%uid%",schmapplet.uid);
_10c=_10c.replace("%sid%",schmapplet.sid);
var _10d=24;
var _10e=24;
if(settings["PngThumbnailSize"]){
var _10f=settings["PngThumbnailSize"].split(",");
_10d=_10f[0];
_10e=_10f[1];
}
for(var i=0;i<schmapplet.places.length;i++){
var _111=schmapplet.places[i];
hasTwoThumsInPlaceStrip=false;
_111.has_photos=false;
if(!((typeof (settings.ThumbInPlaceStrip)!="undefined")&&settings.ThumbInPlaceStrip.match(/no/i))){
if((typeof (settings.UseAlternativeThumbs)!="undefined")&&settings.UseAlternativeThumbs.match(/true/i)&&typeof (_111.email)!="undefined"&&_111.email.length>0){
hasTwoThumsInPlaceStrip=true;
var _112=_111.email.split(" ");
_111.has_photos=true;
if(_112.length==2){
var _113=_112[0];
var _114=_112[1];
_111.photo_thumb=PNGck({src:_10c+"/pictures_t/"+_114,width:_10d,height:_10e});
_111.photo_thumb_left=PNGck({src:_10c+"/pictures_t/"+_113,width:_10d,height:_10e});
}
_111.photo_thumb.loaded=true;
}else{
if(settings["SingleImageInDetailsStrip"]=="true"&&_111.email!==""){
_111.photo_thumb=PNGck({src:_10c+"/pictures_t/"+_111.email,width:_10d,height:_10e});
_111.has_photos=true;
_111.photo_thumb.loaded=true;
}else{
if(typeof (_111.photo_objs)!="undefined"&&_111.photo_objs.length){
_111.photo_thumb=PNGck({src:_10c+"/pictures_t/"+_111.photo_objs[0].path,width:_10d,height:_10e});
_111.photo_thumb.loaded=true;
}
}
}
}
if(typeof (_111.photo_objs)=="undefined"||!_111.photo_objs.length){
continue;
}
_111.has_photos=true;
}
}
function makeLargePhotos(){
if(schmapplet.photoMade){
return;
}
var _115=settings.SchmappletHome.replace("%uid%",schmapplet.uid);
_115=_115.replace("%sid%",schmapplet.sid);
for(var i=0;i<schmapplet.places.length;i++){
var _117=schmapplet.places[i];
_117.has_photos=false;
if(typeof (_117.photo_objs)=="undefined"||!_117.photo_objs.length){
continue;
}
_117.has_photos=true;
for(var j=0;j<_117.photo_objs.length;j++){
photo=_117.photo_objs[j];
var _119=IMG({id:"photo",src:_115+"/pictures/"+photo.path});
_117.photo_IMG.push(_119);
}
}
schmapplet.photoMade=true;
}
function showPhoto(){
var _11a=schmapplet.places[schmapplet.selected].photo_IMG[schmapplet.selectedPhoto];
settings["photo"]=_11a;
_11a.lnk=schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].link;
if(_11a.lnk!=""){
_11a.onclick=function(){
window.open(this.lnk);
};
}
if($("photo-p").childNodes.length>0){
$("photo-p").removeChild($("photo-p").firstChild);
}
if(isphotoComplete(_11a)){
$("photo-p").appendChild(_11a);
}
}
function showPhotoWhenDownloadComplete(){
if(xmlHttpPhoto===undefined){
try{
xmlHttpPhoto=new XMLHttpRequest();
}
catch(e){
try{
xmlHttpPhoto=new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
catch(e){
try{
xmlHttpPhoto=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
logDebug("Your browser does not support AJAX!");
showPhoto();
return;
}
}
}
}
xmlHttpPhoto.onreadystatechange=function(){
if(xmlHttpPhoto.readyState==4){
if(xmlHttpPhoto.status==200){
showPhoto();
}
}
};
var _11b="/"+schmapplet.uid+"/"+schmapplet.sid+"/pictures/"+schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].path;
logDebug("1",_11b);
xmlHttpPhoto.open("GET",_11b,false);
xmlHttpPhoto.send(null);
}
function setSubtitle(){
if(schmapplet.uplace&&showMyPlace){
subtitle=schmapplet.uplace.name;
}else{
if(typeof (settings.MiniSubTitle)!="undefined"&&settings.MiniSubTitle!="undefined"){
subtitle=settings.MiniSubTitle;
}else{
if(typeof (subTitleFromPlaces)!="undefined"&&subTitleFromPlaces.length>0){
subtitle=subTitleFromPlaces;
}else{
if(typeof (schmapplet.title)!="undefined"&&schmapplet.title.length>0){
subtitle=schmapplet.title;
}else{
if(typeof (schmapplet.subtitle)!="undefined"&&schmapplet.subtitle.length>0){
subtitle=schmapplet.subtitle;
}else{
subtitle=" ";
}
}
}
}
}
}
function loadPlaces(){
schmapplet.firstNormalIcon="";
if(settings.HideInfoPanel!="yes"){
if(typeof (xparams)!="undefined"&&typeof (xparams.infoIcon)!="undefined"&&xparams.infoIcon.length>0){
$("infoEle").innerHTML=PNG_html({"src":xparams.infoIcon,"width":13,"height":13});
}else{
$("infoEle").innerHTML=PNG_html({"src":" /images/minitemplate/pageicons/info.png","width":13,"height":13});
}
connect("infoEle","onmouseover",showMyPanel);
connect("infoEle","onmouseleave",hideMyPanel);
connect("copyright-hotswap-div","onmouseover",showMyPanel);
connect("copyright-hotswap-div","onmouseout",hideMyPanel);
}
if(typeof (settings.FeedbackLink)!="undefined"&&settings.FeedbackLink.length>0&&$("feedback")){
showElement("feedback");
$("feedbackHref").onclick=function(){
window.open(settings.FeedbackLink);
$("copyright-hotswap-div").style.visibility="hidden";
};
}
if(typeof (settings.isGuideSchmapplet)!="undefined"&&settings.isGuideSchmapplet.match(/^true$/i)){
if(typeof (xparams)!="undefined"&&typeof (xparams.topLogo)!="undefined"&&xparams.topLogo!=""){
var _11c=xparams.topLogo;
}else{
var _11c="/images/minitemplate/guidelogos/"+schmapplet.uid+".png";
}
var _11d=PNG({width:122,height:22,"src":_11c});
$("title-link").removeChild($("title-link").lastChild);
$("title-link").appendChild(_11d);
if(typeof (settings.DisableTitleLinks)=="undefined"||settings.DisableTitleLinks=="false"||settings["TitleLink"]=="true"){
disconnect(_11d,"onclick",mainTitlGo);
connect(_11d,"onclick",mainTitlGo);
}else{
disconnect($("title-link").lastChild,"onmouseover",hideUnderline);
connect($("title-link").lastChild,"onmouseover",hideUnderline);
}
hideElement("title");
$("title-link").style.padding="0px";
$("title-button-span").innerHTML="";
$("subtitle-button-span").innerHTML="";
if(settings["GameVenueLink"]=="true"){
disconnectAll("TitleIn","onmouseover");
connect("TitleIn","onmouseover",showUnderline);
connect("TitleIn","onmouseout",hideUnderline);
connect("TitleIn","onclick",stripTitleGo);
setStyle("TitleIn",{"cursor":"pointer"});
}
var _11e=document.body.clientWidth;
if(showMenusFromUrl==null&&typeof (xparams)!="undefined"&&typeof (xparams.showMenus)!="undefined"&&xparams.showMenus.length>0){
ShowMenus=xparams.showMenus;
}else{
ShowMenus=showMenusFromMeta;
}
if(ShowMenus!=null){
for(var i=0;i<ShowMenus.length;i++){
showTwoMenus[i]=ShowMenus.charAt(i);
}
}
if(showTwoMenus[0]==1){
guideHtml="<iframe id=\"guide-hotswap-frame\" name=\"guide-hotswap-frame\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" allowTransparency=\"true\" style=\"border-style:none; border-width:0px;\" ></iframe>";
$("guide-hotswap-div").innerHTML=guideHtml;
if(isIE6){
setStyle("guide-hotswap-frame",{"width":_11e-6+"px"});
}
if(typeof (xparams)!="undefined"&&typeof (xparams.topButton)!="undefined"&&xparams.topButton!=""){
var _120=xparams.topButton;
}else{
var _120="/images/minitemplate/pageicons/MiniGuidesMenuBtn.png";
}
showElement("title-button-span");
appendChildNodes("title-button-span",PNG({"width":50,"height":16,id:"title-button",src:_120}));
if(settings.MiniMenuOverrideName!="undefined"&&settings.MiniMenuOverrideName!=null&&settings.MiniMenuOverrideName.length>0){
var _121=settings.MiniMenuOverrideName;
if(!schmapplet.isiGoogle&&schmapplet.lang&&schmapplet.lang!==""){
if(schmapplet.lang!=="en"){
_121=settings.MiniMenuOverrideName.replace(".xml.var","")+"_"+schmapplet.lang+".xml";
}else{
_121=settings.MiniMenuOverrideName.replace(".var","");
}
}
var _122="/xml/"+_121;
guideSrcXml="/common/minicitiesmenu.html?"+_122+"&Countries";
truncationNeeded=0;
}else{
var _122="/xml/mininavmenu.xml";
truncationNeeded=1;
}
loadCountriesInfo(_122);
guideLoaded=0;
if(BrowserDetect.browser==="Firefox"){
$("guide-hotswap-frame").style.position="fixed";
if($("optionalBottomText")){
var _123=document.documentElement.clientHeight;
var temH=_123-schmapplet.advertH-24-23;
setElementDimensions("guide-hotswap-frame",{h:temH});
}else{
var _123=getElementDimensions("canvas").h;
var _125=getElementDimensions("canvas").w;
var temW=_125-6;
var temH=_123-24-23;
setElementDimensions("guide-hotswap-frame",{h:temH,w:temW});
}
guideHtml=$("guide-hotswap-div").innerHTML;
$("guide-hotswap-div").innerHTML="";
}
analyticsConnect("title-button-span","onmouseover",showGuideHotSwap,analyticsHooks.topNavOver);
analyticsConnect("title-button-span","onclick",function(){
},analyticsHooks.topNavClick);
connect("title-button-span","onmouseout",hideGuideHotSwap);
connect("guide-hotswap-div","onmouseout",hideGuideHotSwap);
}else{
hideElement("title-button-span");
$("guide-hotswap-div").innerHTML="";
disconnect("title-button-span","onmouseover",showGuideHotSwap);
disconnect("title-button-span","onmouseout",hideGuideHotSwap);
disconnect("guide-hotswap-div","onmouseout",hideGuideHotSwap);
}
if(showTwoMenus[1]==1){
sectionHtml="<iframe id=\"section-hotswap-frame\" name=\"section-hotswap-frame\"  frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" allowTransparency=\"true\" style=\"border-style:none; border-width:0px;\"></iframe>";
$("section-hotswap-div").innerHTML=sectionHtml;
if(isIE6){
setStyle("section-hotswap-frame",{"width":_11e-6+"px"});
}
if(typeof (xparams)!="undefined"&&typeof (xparams.sectionButton)!="undefined"&&xparams.sectionButton!=""){
var _127=xparams.sectionButton;
}else{
var _127="/images/minitemplate/pageicons/MiniSectionMenuBtn.png";
}
appendChildNodes("subtitle-button-span",PNG({"width":16,"height":12,id:"subtitle-button",src:_127}));
$("subtitle-button-span").style.visibility="visible";
if(!settings.MiniMenu2OverrideName){
settings.MiniMenu2OverrideName="nav.xml";
}
if(templateChanged||!initialized){
if(!schmapplet.isiGoogle){
if(schmapplet.lang&&schmapplet.lang!==""){
if(schmapplet.lang!=="en"){
settings.MiniMenu2OverrideName=settings.MiniMenu2OverrideName.replace(".xml","")+"_"+schmapplet.lang+".xml";
}
}
}
}
var _128=["",schmapplet.uid,settings.MiniMenu2OverrideName].join("/");
loadNavInfo(_128);
if(BrowserDetect.browser==="Firefox"){
$("section-hotswap-frame").style.position="fixed";
if($("optionalBottomText")){
var _123=document.documentElement.clientHeight;
var temH=_123-schmapplet.advertH-24-23;
setElementDimensions("section-hotswap-frame",{h:temH});
}else{
var _123=getElementDimensions("canvas").h;
var _125=getElementDimensions("canvas").w;
var temW=_125-6;
var temH=_123-24-23;
setElementDimensions("section-hotswap-frame",{h:temH,w:temW});
}
sectionHtml=$("section-hotswap-div").innerHTML;
$("section-hotswap-div").innerHTML="";
}
analyticsConnect("subtitle-button-span","onmouseover",showSectionHotSwap,analyticsHooks.secondNavOver);
analyticsConnect("subtitle-button-span","onclick",function(){
},analyticsHooks.secondNavClick);
connect("subtitle-button-span","onmouseleave",hideSectionHotSwap);
connect("section-hotswap-div","onmouseout",hideSectionHotSwap);
}else{
hideElement("subtitle-button-span");
$("section-hotswap-div").innerHTML="";
disconnect("subtitle-button-span","onmouseover",showSectionHotSwap);
disconnect("subtitle-button-span","onmouseleave",hideSectionHotSwap);
disconnect("section-hotswap-div","onmouseout",hideSectionHotSwap);
}
}
if((typeof (settings.ShowAllPlayButtons)!="undefined"&&settings.ShowAllPlayButtons.match(/^false$/i))){
$("prev-button").innerHTML="";
$("next-button").innerHTML="";
if(typeof (xparams)!="undefined"&&typeof (xparams.prevButton)!="undefined"&&xparams.prevButton!=""){
var back=xparams.prevButton;
}else{
var back=settings.Back;
}
if(typeof (xparams)!="undefined"&&typeof (xparams.nextButton)!="undefined"&&xparams.nextButton!=""){
var _12a=xparams.nextButton;
}else{
var _12a=settings.Forward;
}
appendChildNodes("prev-button",PNG({src:back,width:13,height:13}));
appendChildNodes("next-button",PNG({src:_12a,width:13,height:13}));
if(typeof (settings.PrevButtonTxt)!="undefined"&&settings.PrevButtonTxt.length>0){
$("prev-button").title=settings.PrevButtonTxt;
}else{
$("prev-button").title="prev place";
}
if(typeof (settings.NextButtonTxt)!="undefined"&&settings.NextButtonTxt.length>0){
$("next-button").title=settings.NextButtonTxt;
}else{
$("next-button").title="next place";
}
if(!initialized){
disconnect("prev-button","onclick",prevPlace);
analyticsConnect("prev-button","onclick",prevPlace,analyticsHooks.back);
disconnect("next-button","onclick",nextPlace);
analyticsConnect("next-button","onclick",nextPlace,analyticsHooks.forward);
}
}
schmapplet.placesById=[];
schmapplet._placesCount=0;
settings.myImg=IMG({"style":"visibility:hidden;position:absolute;"});
appendChildNodes("canvas",settings.myImg);
var _12b=printLogoPath+schmapplet.uid+".gif";
settings.myImg.src=_12b;
settings.NormalIconSize=settings.NormalIconSize.toString().split(",");
settings.NormalIconAnchor=settings.NormalIconAnchor.toString().split(",");
settings.OverIconSize=settings.OverIconSize.toString().split(",");
settings.OverIconAnchor=settings.OverIconAnchor.toString().split(",");
schmapplet.normalAnchorX=settings.NormalIconSize[0]*settings.NormalIconAnchor[0];
schmapplet.normalAnchorY=settings.NormalIconSize[1]*settings.NormalIconAnchor[1];
schmapplet.overAnchorX=settings.OverIconSize[0]*settings.OverIconAnchor[0];
schmapplet.overAnchorY=settings.OverIconSize[1]*settings.OverIconAnchor[1];
var xml=schmapplet.placesInfo.xml;
xmlAccess.setXmlDoc(xml);
schmapplet.placeslist=xmlAccess.getChildren(xml,"/rdf:RDF/schmap:Place");
var _12d=schmapplet.description;
var _12e=xmlAccess.getFirstChild(xml,"/rdf:RDF/schmap:Schmapplet");
var _12f=xmlAccess.getAttributeNS(_12e,"rdf","about")||"";
Map_object.schmapplet_path=_12f;
Map_object.schmapplet_s=xmlAccess.getSingleChildText(_12e,"georss:box");
Map_object.origGeoBox=Map_object.schmapplet_s;
var _130=xmlAccess.getSingleChildText(_12e,"dc:created");
var _131=xmlAccess.getSingleChildText(_12e,"dc:title");
schmapplet.title=_131;
subTitleFromPlaces=xmlAccess.getSingleChildText(_12e,"dc:subtitle");
if(initialized&&typeof (schmapplet.applyColors)!="undefined"&&schmapplet.applyColors.match(/yes/i)){
if((typeof (schmapplet.usingSTemplate)!="undefined")&&schmapplet.usingSTemplate==1&&typeof (xparams)!="undefined"&&typeof (xparams.colorString)!="undefined"){
colorset=xparams.colorString;
}else{
colorset=xmlAccess.getSingleChildText(_12e,"schmap:colors");
}
changingColor(colorset);
}
if(colorset.length<1||colorset.toLowerCase()=="none"){
var _132=getHashParams();
schmapplet.colorset=null;
colorset=_132.c||"";
if(colorset.length<0||colorset.toLowerCase()=="none"){
colorset="f6f6f6A72122A62122A62122FFF88FFAF5BBffffffFFF88Fd8d8d8A4A7A6A621226990ffECEBBD0000005C5A4E5C5A4E000000929292F0EFDA";
}
changingColor(colorset);
}
var _133=xmlAccess.getFirstChild(_12e,"schmap:guide");
guide_url=xmlAccess.getAttributeNS(_133,"rdf","resource");
var _134=xmlAccess.getFirstChild(xml,"/rdf:RDF/schmap:Guide");
var loc=xmlAccess.getSingleChildText(_134,"dc:title");
citycode=xmlAccess.getSingleChildText(_134,"dc:cityid");
citycode=citycode.split("C");
citycode=citycode[1];
curCityName=loc;
setSubtitle();
if((typeof (schmapplet.usingSTemplate)!="undefined")&&schmapplet.usingSTemplate==1&&typeof (xparams)!="undefined"&&typeof (xparams.bestFit)!="undefined"){
var geos=xparams.bestFit.split(",");
var latN=geos[0];
var _138=geos[1];
var latS=geos[2];
var _13a=geos[3];
Map_object.schmapplet_s=concat([latS," ",_138," ",latN," ",_13a]);
Map_object.origGeoBox=Map_object.schmapplet_s;
}else{
if(typeof (topleft)!="undefined"&&topleft!="undefined"&&typeof (bottomright)!="undefined"&&bottomright!="undefined"){
var tl=topleft.split(",");
var br=bottomright.split(",");
Map_object.schmapplet_s=concat([tl[0]," ",tl[1]," ",br[0]," ",br[1]]);
}else{
if(typeof (schmapplet.topleft)!="undefined"&&schmapplet.topleft!="undefined"&&schmapplet.topleft!=null&&typeof (schmapplet.bottomright)!="undefined"&&schmapplet.bottomright!="undefined"&&schmapplet.bottomright!=null){
var tl=schmapplet.topleft.split(",");
var br=schmapplet.bottomright.split(",");
Map_object.schmapplet_s=concat([tl[0]," ",tl[1]," ",br[0]," ",br[1]]);
}
}
}
subtitle=subtitle.replace(/^\s+|\s+$/g,"");
logDebug("subtitle",subtitle);
noPhotosAtAll=true;
createPage();
}
function clickTitle(){
var _13d=Map_object.schmapplet_path;
window.open(_13d);
}
function clickLogo(){
try{
if(typeof (settings.FooterType)!="undefined"&&settings.FooterType.match(/panel/i)){
return;
}
if(typeof (settings.FooterLink)!="undefined"){
window.open(settings.FooterLink,"LogoLink","width=950, height=650, scrollbars=no, resizable=no");
}else{
showCustomizePage();
}
}
catch(err){
logDebug(err);
}
}
function mouseIntoTextPanelFromBottom(evt,obj){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var pos=getElementPosition(obj);
var dim=getElementDimensions(obj);
if(schmapplet.IEquirks){
pos.y+=2;
pos.x+=2;
}
if(isSafari){
my+=14;
}
if(mx==0||my==0){
return true;
}
if(pos.x<mx&&(pos.x+dim.w)>mx&&pos.y<my&&(pos.y+dim.h)>my){
return true;
}
return false;
}
function createTopPhotoTable(){
if(isCreatePhoto){
return;
}
var _144=$("photos");
var _145=document.createElement("table");
_145.setAttribute("id","photo-table");
var _146=document.createElement("tbody");
var _147=document.createElement("tr");
mycurrent_cellTD=document.createElement("td");
schmapplet.mycurrent_cellTD=mycurrent_cellTD;
var _148=document.createElement("p");
_148.valign="center";
_148.setAttribute("id","photo-p");
mycurrent_cellTD.appendChild(_148);
_147.appendChild(mycurrent_cellTD);
_146.appendChild(_147);
_147=document.createElement("tr");
mycurrent_cell=document.createElement("td");
var _149=document.createElement("p");
_149.setAttribute("align","left");
_149.setAttribute("id","photo-attr");
_149.valign="middle";
photo_cc=PNG({width:12,height:12,"class":"cc","src":settings.CC});
photo_cc.align="absmiddle";
photo_cc.setAttribute("id","photo-cc");
mycurrent_cellTD.appendChild(_149);
_147=document.createElement("tr");
mycurrent_cell=document.createElement("td");
var _14a=document.createElement("div");
_14a.setAttribute("id","photo-button");
if(typeof (xparams)!="undefined"&&typeof (xparams.back)!="undefined"){
var back=xparams.back;
}else{
var back=settings.Back;
}
if(typeof (xparams)!="undefined"&&typeof (xparams.nextButtonOver)!="undefined"){
var _14c=xparams.nextButtonOver;
}else{
var _14c="/images/iconsDir/prev-over.png";
}
if(typeof (xparams)!="undefined"&&typeof (xparams.forward)!="undefined"){
var _14d=xparams.forward;
}else{
var _14d=settings.Forward;
}
if(typeof (xparams)!="undefined"&&typeof (xparams.prevButtonOver)!="undefined"){
var _14e=xparams.prevButtonOver;
}else{
var _14e="/images/iconsDir/next-over.png";
}
var _14f=PNG({id:"prev-photo",width:13,height:13,"src":back});
var _150=PNG({id:"overPrev",width:13,height:13,"src":_14c});
_14f.imgMouseover=_150;
_150.imgMouseout=_14f;
hideElement(_150);
_14f.align="absmiddle";
_150.align="absmiddle";
_150.onclick=previousPhoto;
_150.setAttribute("title","previous photo");
_14a.appendChild(_14f);
_14a.appendChild(_150);
connect(_14f,"onmouseover",changePhoto);
connect(_150,"onmouseout",changePhotoBack);
_14a.appendChild(SPAN({"style":"width:2px"}," "));
var _151=PNG({width:13,height:13,"src":_14d});
var _152=PNG({width:13,height:13,"src":_14e});
_151.imgMouseover=_152;
_152.imgMouseout=_151;
hideElement(_152);
_151.align="absmiddle";
_152.align="absmiddle";
_152.onclick=nextPhoto;
_152.setAttribute("title","next photo");
_14a.appendChild(_151);
_14a.appendChild(_152);
connect(_151,"onmouseover",changePhoto);
connect(_152,"onmouseout",changePhotoBack);
_14a.valign="middle";
mycurrent_cellTD.appendChild(_14a);
_145.appendChild(_146);
_144.appendChild(_145);
var h=((document.body.clientHeight-160)-16-140)/2-11-9;
if(h<=0){
h=2;
}
isCreatePhoto=true;
}
function adjustPhotoTab(){
try{
var _154=$("view-panel").clientWidth+"px";
if($("zoom-p")){
setStyle("zoom-p",{width:_154});
}
if(schmapplet.IEquirks||BrowserDetect.browser=="Safari"){
if(schmapplet.mycurrent_cellTD){
setStyle(schmapplet.mycurrent_cellTD,{"height":((document.body.clientHeight-160)-16)+"px"});
setStyle("photo-button",{"width":(document.body.clientWidth-22)+"px"});
}
}
map(function(ele){
setStyle(ele,{"margin-left":document.body.clientWidth/2-5+"px"});
},["upArrowStats","disupStats","downStats","disdownStats"]);
if(schmapplet.sportsSchedule){
map(function(ele){
setStyle(ele,{"margin-left":document.body.clientWidth/2-5+"px"});
},["upArrow","disup","down","disdown"]);
}
}
catch(err){
errLog(err);
}
}
function showTopPhoto(){
try{
$("loading-message-guide").style.visibility="visible";
$("photo-table").style.visibility="hidden";
var _157=$("photos");
var _158=schmapplet.places[schmapplet.selected].photo_IMG[schmapplet.selectedPhoto];
if(typeof (_158)=="undefined"){
return;
}
settings["photo"]=_158;
settings.photo.lnk=schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].link;
if(settings.photo.lnk!=""){
settings.photo.onclick=function(){
window.open(this.lnk);
};
}
if($("photo-p").childNodes.length>0){
$("photo-p").removeChild($("photo-p").firstChild);
}
if(isphotoComplete(settings.photo)){
$("photo-p").appendChild(settings.photo);
}
checkPhotoFinished();
if(schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].username){
var _159="Photo: "+schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].username;
_159=truncated(_159,_157.offsetWidth/8);
if(schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].licensecode&&schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].licensecode>=1&&schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].licensecode<=6){
photo_cc.lnk=schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].licenseurl;
photo_cc.onclick=function(){
window.open(this.lnk);
};
$("photo-attr").innerHTML=_159+"&nbsp;";
$("photo-attr").appendChild(photo_cc);
}else{
if($("photo-attr").childNodes.length>0){
$("photo-attr").removeChild($("photo-attr").firstChild);
}
$("photo-attr").innerHTML=_159+"&nbsp;";
}
}else{
$("photo-attr").innerHTML="";
}
}
catch(err){
logDebug(err);
}
}
function previousPhoto(){
try{
if(schmapplet.selectedPhoto<=0){
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
var _15a=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].photo_objs.length<=0){
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
if(_15a==schmapplet.selected){
break;
}
}
schmapplet.places[schmapplet.selected].highlight(true);
setCurrentCounter(schmapplet.selected+1);
schmapplet.selectedPhoto=schmapplet.places[schmapplet.selected].photo_objs.length-1;
}else{
schmapplet.selectedPhoto-=1;
}
showTopPhoto();
}
catch(err){
logException(err,"4.");
}
}
function previousStats(){
try{
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
var _15b=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].ldesc==""){
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
if(_15b==schmapplet.selected){
break;
}
}
schmapplet.places[schmapplet.selected].highlight(true);
setCurrentCounter(schmapplet.selected+1);
}
catch(err){
logException(err,"previousStats");
}
}
function showReviewLink(){
if(typeof (settings.T000LinkInPlaceStrip)!="undefined"&&settings.T000LinkInPlaceStrip.length>0){
var _15c=$("reviewlink-url");
var url_=new StringBuffer();
url_.append(schmapplet.url_prefix).append(schmapplet.uid).append("/");
url_.append(schmapplet.sid).append("/#mapview=");
if(typeof (schmapplet.mapview)!="undefined"&&schmapplet.mapview.length>0){
url_.append(schmapplet.mapview);
}else{
url_.append("Map");
}
url_.append("&tab=Places&p=");
var _15e=schmapplet.places[schmapplet.selected].id;
url_.append(_15e);
var s=Map_object.schmapplet_s.split(" ");
url_.append("&topleft=");
url_.append(s[0]).append(",").append(s[1]);
url_.append("&bottomright=").append(s[2]).append(",").append(s[3]);
if(schmapplet.places[schmapplet.selected].wcities_only&&schmapplet.places[schmapplet.selected].wcities_photos.length>0){
url_.append("&i=");
url_.append(schmapplet.places[schmapplet.selected].wcities_photos[0].path);
}else{
if(schmapplet.places[schmapplet.selected].photo_objs.length){
url_.append("&i=");
url_.append(schmapplet.places[schmapplet.selected].photo_objs[schmapplet.selectedPhoto].path);
}
}
var _160=new StringBuffer();
_160.append("<a id='reviewlink-url-bak' href='").append(url_.toString());
_160.append("' target='_blank'><i>").append(settings.T000LinkInPlaceStrip.toString());
_160.append("</i></a>");
$("reviewlink-a").innerHTML=_160.toString();
showElement("reviewlink-a");
$("place-thumb").href=url_.toString();
}else{
hideElement("reviewlink-a");
}
}
PlaceObj.prototype.highlight=function(_161,_162){
try{
if((typeof (settings.TitleInPlaceStrip)!="undefined")&&settings.TitleInPlaceStrip.match(/no/i)){
hideElement("TitleIn");
}else{
var _163=$("place-info").clientWidth;
if((schmapplet.usingSTemplate)&&this.zoomedIn){
$("TitleIn").initTxt=this.addr2;
var _164=getTrunction("TitleIn",_163,9);
$("TitleIn").innerHTML=_164;
}else{
var _165=new StringBuffer();
$("TitleIn").initTxt=this.name;
var _164=getTrunction("TitleIn",_163,9);
if(settings["StripTitleLink"]=="true"&&this.url!==""){
_165.append("<a href=\"").append(this.url).append("\" target=\"blank\">").append(_164).append("</a>");
}else{
_165.append(_164);
}
$("TitleIn").innerHTML=_165.toString();
}
showElement("TitleIn");
}
if((typeof (settings.urlInPlaceStrip)!="undefined")&&!(settings.urlInPlaceStrip.match(/no/i))&&this.stickyPlaceType!==2){
var _166=$("place-url");
if(this.url.length){
_166.href=this.url;
}
_166.innerHTML=this.urlText.toString();
showElement("UrlIn");
}else{
hideElement("UrlIn");
}
if(this.has_photos){
showElement("photo-p");
showElement("photo-attr");
showElement("photo-button");
if(((typeof (settings.ThumbInPlaceStrip)!="undefined")&&settings.ThumbInPlaceStrip.match(/no/i))||!this.photo_thumb.loaded){
hideElement("place-thumb");
}else{
replaceChildNodes("place-thumb",this.photo_thumb);
showElement("place-thumb");
if(typeof (this.photo_thumb_left)!="undefined"){
replaceChildNodes("place-thumb-left",this.photo_thumb_left);
showElement("place-thumb-left");
}else{
hideElement("place-thumb-left");
}
if(schmapplet.IEquirks){
setStyle("TitleIn",{"margin-top":"0px"});
}
}
schmapplet.selectedPhoto=0;
if(_161==null&&isPhotoView){
showTopPhoto();
}
}else{
hideElement("photo-p");
hideElement("photo-attr");
hideElement("photo-button");
hideElement("place-thumb");
hideElement("place-thumb-left");
}
if(schmapplet.usingSTemplate==1){
if(settings["TopMargin"]){
var _167=settings["TopMargin"].split(",");
var top=Number(_167[0]);
var _169=_167[1]+"px";
if(schmapplet.IEquirks){
setStyle("TitleIn",{"margin-top":(top+5)+"px"});
}else{
setStyle("TitleIn",{"margin-top":_167[0]+"px"});
}
setStyle("TitleIn",{"margin-bottom":_169});
}
}
if(settings["TopMarginShortDesc"]){
var _16a=settings["TopMarginShortDesc"].split(",");
var _16b=_16a[0]+"px";
var _16c=_16a[1]+"px";
setStyle("ShortDescIn",{"margin-top":_16b});
setStyle("ShortDescIn",{"margin-bottom":_16c});
}
if(((typeof (settings.AddrLine1InPlaceStrip)!="undefined")&&settings.AddrLine1InPlaceStrip.match(/no/i))||(this.stickyPlaceType===2)){
hideElement("AddrLine1In");
}else{
var _163=$("place-info").clientWidth;
$("AddrLine1In").initTxt=this.street;
if($("place-thumb-left").style.display!="none"){
var _16d=getElementDimensions("place-thumb-left").w;
}else{
var _16d=0;
}
if($("place-thumb").style.display!="none"){
var _16e=getElementDimensions("place-thumb").w;
}else{
var _16e=0;
}
var temW=_163-_16d-_16e-5;
if(isIE6){
addElementClass("AddrLine1In","n-placeInfo");
var _170=11;
}else{
var _170=9;
}
var _164=getTrunction("AddrLine1In",temW,_170);
$("AddrLine1In").innerHTML=_164;
showElement("AddrLine1In");
}
if(((typeof (settings.PhoneNoInPlaceStrip)!="undefined")&&settings.PhoneNoInPlaceStrip.match(/no/i))||(this.stickyPlaceType===2)){
hideElement("PhoneNoIn");
}else{
var _163=$("place-info").clientWidth;
$("PhoneNoIn").initTxt=this.telnumber;
if($("place-thumb-left").style.display!="none"){
var _16d=getElementDimensions("place-thumb-left").w;
}else{
var _16d=0;
}
if($("place-thumb").style.display!="none"){
var _16e=getElementDimensions("place-thumb").w;
}else{
var _16e=0;
}
var temW=_163-_16d-_16e-5;
var _164=getTrunction("PhoneNoIn",temW,9);
$("PhoneNoIn").innerHTML=_164;
showElement("PhoneNoIn");
}
var h=$("place-name-top");
h.innerHTML=this.name;
if(!autoPlaying){
updateParentIframeCode();
}
if((typeof (settings.ShortDescInPlaceStrip)!="undefined")&&settings.ShortDescInPlaceStrip.match(/no/i)&&this.stickyPlaceType!==2){
hideElement("ShortDescIn");
}else{
var _163=$("place-info").clientWidth;
if($("place-thumb-left").style.display!="none"){
var _16d=getElementDimensions("place-thumb-left").w;
}else{
var _16d=0;
}
if($("place-thumb").style.display!="none"){
var _16e=getElementDimensions("place-thumb").w;
}else{
var _16e=0;
}
var temW=_163-_16d-_16e-5;
$("ShortDescIn").initTxt=this.sdesc;
var _164=getTrunction("ShortDescIn",temW,9);
$("ShortDescIn").innerHTML=_164;
showElement("ShortDescIn");
}
if(this.stickyPlaceType===2){
showElement("ShortDescIn");
}
if((typeof (settings.ShortDescInPlaceStrip)!="undefined")&&settings.ShortDescInPlaceStrip.match(/no/i)&&this.stickyPlaceType!==2){
showReviewLink();
}else{
hideElement("reviewlink-a");
}
if(schmapplet.hasHtml1Tab){
$("statsContent").innerHTML=this.ldesc;
if(isStatsView){
jugdescroll($("stats"));
}
}
if(this.stickyPlaceType!=2&&schmapplet.hasDetailTab){
var addr=this.addr1+", "+this.city;
if(addr==(this.addr1+", ")){
$("detail-street").innerHTML=this.addr1;
}else{
$("detail-street").innerHTML=this.addr1+", "+this.city;
}
if(this.addr2.length){
$("detail-ext").innerHTML=this.addr2;
showElement("detail-ext");
}else{
hideElement("detail-ext");
}
if(this.zip.length){
$("detail-pcode").innerHTML=this.zip;
showElement("detail-pcode");
}else{
hideElement("detail-pcode");
}
if(this.tel.length){
$("detail-tel").innerHTML=this.tel;
showElement("detail-tel");
}else{
hideElement("detail-tel");
}
if(this.url.length){
var _173=$("html-url");
_173.href=this.url;
_173.innerHTML=this.urlText;
if(this.extra_url==false){
var desc=$("detail-desc");
if(desc.clientWidth>16){
setTextTrimmed("html-url",this.urlText,desc.clientWidth-16);
}
}
showElement("detail-url");
}else{
hideElement("detail-url");
}
if(this.ldesc.length){
$("detail-desc").innerHTML=this.ldesc;
showElement("detail-desc");
}else{
hideElement("detail-desc");
}
}else{
hideElement("detail-street");
hideElement("detail-ext");
hideElement("detail-pcode");
hideElement("detail-tel");
hideElement("detail-url");
hideElement("detail-desc");
}
if(schmapplet.view!="map"){
return;
}
logDebug(schmapplet.view);
this.maphighlight(_162);
}
catch(err){
logException(err,"3.");
}
};
PlaceObj.prototype.maphighlight=function(_175){
if(schmapplet.noAutoPan){
_175=schmapplet.noAutoPan;
}
if(schmapplet.map.provider=="s"&&(_175==null)){
if(schmapplet.actualOrigBounds.contains(this.geocode)){
if(!showingOrigMap){
schmapplet.map.setDisplay(schmapplet.origbounds.getCenter());
showingOrigMap=true;
}
}else{
try{
schmapplet.map.setDisplay(this.geocode);
showingOrigMap=false;
}
catch(e){
if(e instanceof MochiKit.Maps.OutOfBounds){
logDebug("Point out of bounds, not displaying");
}
return;
}
}
}
if(!(schmapplet.marker&&this.marker)){
return;
}
this.markerbig.show();
this.marker.hide();
if(!(schmapplet.marker&&this.Gmarker)){
return;
}
this.Gmarkerbig.show();
this.Gmarker.hide();
};
PlaceObj.prototype.unhighlight=function(){
if(!(schmapplet.marker&&this.marker)){
return;
}
this.markerbig.hide();
this.marker.show();
if(!(schmapplet.marker&&this.Gmarker)){
return;
}
this.Gmarkerbig.hide();
this.Gmarker.show();
};
function prevPlace(){
stopCycling();
if(autoPlaying){
autoPlayPaused=true;
}
if(isStatsView){
previousStats();
}else{
var _176=schmapplet.places[schmapplet.selected];
var _177=_176.zoomedIn;
if(typeof (schmapplet.selected)!="undefined"){
if(_177){
if(settings.ZoomOutOnChange=="no"){
_176.zoomedIn=false;
if(schmapplet.places[schmapplet.selected].gmarkerbig){
schmapplet.places[schmapplet.selected].gmarkerbig.hide();
}
}else{
zoomInOut();
_177=false;
}
}
}else{
schmapplet.selected=0;
}
_176.unhighlight();
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected+=schmapplet.places.length;
}
_176=schmapplet.places[schmapplet.selected];
if(isPhotoView){
while(_176.photo_objs.length<1){
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected+=schmapplet.places.length;
}
_176=schmapplet.places[schmapplet.selected];
}
}
_176.zoomedIn=_177;
_176.highlight();
setCurrentCounter(schmapplet.selected+1);
if(_177){
setDisplay(_176.geocode,_176.gpoint,zoomLevel);
if(schmapplet.needGoogle){
createGMarker(schmapplet.map2,schmapplet.places[schmapplet.selected]);
}
}
if(!autoPlaying){
schmapplet.placeid=_176.id;
}
}
if(schmapplet.view=="schedule"&&typeof (schmapplet.gameDayArray)!="undefined"){
if(schmapplet.selected==(schmapplet.places.length-1)){
var _178=0;
}else{
var _178=schmapplet.selected+1;
}
changeBGback.apply(schmapplet.gameDayArray[_178]);
changeBG.apply(schmapplet.gameDayArray[schmapplet.selected]);
}
}
function nextPhoto(){
try{
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
schmapplet.places[schmapplet.selected].unhighlight();
if((schmapplet.selectedPhoto+1)>=schmapplet.places[schmapplet.selected].photo_objs.length){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
var _179=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].photo_objs.length<=0){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
if(_179==schmapplet.selected){
break;
}
}
schmapplet.selectedPhoto=0;
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
}else{
schmapplet.selectedPhoto+=1;
showTopPhoto();
}
}
catch(err){
logException(err,"44.");
}
}
function nextStats(){
try{
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
var _17a=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].ldesc==""){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
if(_17a==schmapplet.selected){
break;
}
}
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
}
catch(err){
logException(err,"nextStats");
}
}
function nextPlace(evt){
try{
stopCycling();
if(autoPlaying){
autoPlayPaused=true;
}
if(isStatsView){
nextStats();
}else{
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
var _17c=schmapplet.places[schmapplet.selected];
var _17d=schmapplet.zoomedIn;
if(_17d){
if(settings.ZoomOutOnChange=="no"){
_17c.zoomedIn=false;
if(schmapplet.places[schmapplet.selected].gmarkerbig){
schmapplet.places[schmapplet.selected].gmarkerbig.hide();
}
}else{
zoomInOut();
_17d=false;
}
}
_17c.unhighlight();
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
_17c=schmapplet.places[schmapplet.selected];
if(isPhotoView){
while(_17c.photo_objs.length<1){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
_17c=schmapplet.places[schmapplet.selected];
}
}
_17c.zoomedIn=_17d;
_17c.highlight();
setCurrentCounter(schmapplet.selected+1);
if(_17d){
setDisplay(_17c.geocode,_17c.gpoint,zoomLevel);
if(schmapplet.needGoogle){
createGMarker(schmapplet.map2,schmapplet.places[schmapplet.selected]);
}
}
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
}
if(schmapplet.view=="schedule"&&typeof (schmapplet.gameDayArray)!="undefined"){
if(schmapplet.selected==0){
lastone=schmapplet.places.length;
}else{
lastone=schmapplet.selected-1;
}
changeBGback.apply(schmapplet.gameDayArray[lastone]);
changeBG.apply(schmapplet.gameDayArray[schmapplet.selected]);
}
}
catch(err){
logException(err,"444.");
}
}
function setDisplay(geo,_17f,zoom){
var _181=geo;
var zoom=Math.abs(zoom);
if(schmapplet.needGoogle){
var map=schmapplet.map2;
if(_17f===undefined){
_181=new MochiKit.Maps__Google.Point(_181.latitude,_181.longitude);
}else{
_181=_17f;
}
}else{
map=schmapplet.map;
}
map.setDisplay(_181,zoom);
}
function startPlay(){
try{
schmapplet.pauseClick=false;
if(autoPlaying){
if(autoPlayPaused||autoPlayStopped){
autoPlayPaused=false;
if(!flash_d){
num=0;
flashPlayButton();
}
}
}else{
autoPlaying=true;
autoPlayPaused=false;
if(!flash_d){
num=0;
flashPlayButton();
}
}
autoPlayStopped=false;
}
catch(err){
logException(err,"5.");
}
}
function stopPlay(){
pausePlay();
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected=0;
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
autoPlayStopped=true;
autoPlaying=false;
}
function pausePlay(){
stopCycling();
if(autoPlaying){
autoPlayPaused=true;
}
}
function stopCycling(){
stopFlashPlayButton();
}
function cyclePlace(){
try{
if(isPhotoView){
nextPhoto();
}else{
if(isStatsView){
nextStats();
}else{
if((settings.ZoomOutOnChange!="no")||!schmapplet.places[schmapplet.selected].zoomedIn){
nextPlace();
}
}
}
if(autoPlaying){
autoPlayPaused=false;
}
}
catch(err){
logException(err,"6.");
}
}
function isMouseInsideSection(evt){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
if(isSafari20){
if(mx==0&&my<650){
return false;
}
return true;
}
var pos=getElementPosition("guide-hotswap-div");
var dim=getElementDimensions("guide-hotswap-div");
if(schmapplet.IEquirks){
mx+=1;
my+=1;
}
if(!guide_hotswap_showed&&!section_hotswap_showed){
return false;
}
if(my<(pos.y+dim.h)&&my>pos.y&&mx<(pos.x+dim.w)&&mx>pos.x){
return true;
}
return false;
}
function isMouseOutsideSchmappletText(evt){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var _18b=getElementPosition("whatsthis");
var _18c=getElementDimensions("whatsthis");
var pos=getElementPosition("GetSchmappletText");
var dim=getElementDimensions("GetSchmappletText");
if(schmapplet.IEquirks){
mx+=1;
my+=1;
}
if(showed){
if(mx<=_18b.x||mx>=(_18b.x+_18c.w)||my>=(_18b.y+_18c.h)){
return true;
}
}else{
if(mx<=_18b.x||mx>=(_18b.x+_18c.w)||my<=_18b.y||my>=(_18b.y+_18c.h)){
return true;
}
}
return false;
if(my>=(pos.y+dim.h)){
if(my<(_18b.y+_18c.h)&&mx>_18b.x&&mx<(_18b.x+_18c.w)){
return true;
}
}else{
if(my>pos.y&&mx>pos.x&&mx<(pos.x+dim.w)){
return true;
}
}
return false;
}
function checkForHideSchmappletTextPanel(evt){
if(!showed){
return;
}
if(isMouseInsideContainer(evt,"whatsthis","GetSchmappletText")){
return;
}
$("GetSchmappletText").style.visibility="hidden";
showed=false;
autoPlay();
try{
schmapplet.delay.cancel();
schmapplet.delay=null;
}
catch(err){
}
return false;
}
function hideSchmappletTextPanel(evt){
if(isMouseInsideSchmappletText(evt)){
return;
}
$("GetSchmappletText").style.visibility="hidden";
clearTimeout(getThisWidgetPauseTimerId);
showed=false;
autoPlay();
try{
schmapplet.delay.cancel();
schmapplet.delay=null;
}
catch(err){
}
}
function hideGuideHotSwap(evt){
if(isMouseInsideContainer(evt,"title-button","guide-hotswap-div")||loadingNewSchmapplet){
return;
}
try{
if($("guide-hotswap-frame").contentWindow.document.getElementById("leftMenu").style.display=="none"){
$("guide-hotswap-frame").contentWindow.goBack(true);
}
}
catch(e){
}
if($("guide-hotswap-frame")){
$("guide-hotswap-frame").style.visibility="hidden";
}
$("guide-hotswap-div").style.visibility="hidden";
guide_hotswap_showed=false;
section_hotswap_showed=false;
autoPlay();
try{
schmapplet.delay.cancel();
schmapplet.delay=null;
}
catch(err){
}
}
function hideSectionHotSwap(evt){
if(isMouseInsideSection(evt)||loadingNewSchmapplet){
return;
}
try{
if($("section-hotswap-frame").contentWindow.document.getElementById("leftMenu").style.display=="none"){
$("section-hotswap-frame").contentWindow.goBack(true);
}
}
catch(e){
}
$("section-hotswap-frame").style.visibility="hidden";
$("section-hotswap-div").style.visibility="hidden";
guide_hotswap_showed=false;
section_hotswap_showed=false;
autoPlay();
try{
schmapplet.delay.cancel();
schmapplet.delay=null;
}
catch(err){
}
}
function clickHere(){
var _193=window.location.pathname;
var _194=_193.substring(_193.lastIndexOf("/")+1).replace(".html","");
if(schmapplet.map){
var _195=schmapplet.map.provider;
}else{
var _195=map_api_order[0].substr(0,1).toLowerCase();
}
var _196=new StringBuffer();
if(schmapplet.needGoogle){
schmapplet.customizePage="/templates/customize_sports.html";
}
_196.append(schmapplet.customizePage).append("?width=").append(schmapplet.frameWidth).append("&height=").append(schmapplet.frameHeight).append("&tid=");
var _197=template.ident;
var _198=_194.substr(_194.length-1);
if(_195=="c"){
_195=_198;
}
_196.append(_197).append("&tname=").append(_197).append(_195);
_196.append("&uid=").append(schmapplet.uid).append("&sid=");
_196.append(schmapplet.sid);
if(schmapplet.si){
_196.append("&sit=").append(schmapplet.si);
}
if(!schmapplet.isiGoogle&&schmapplet.lang){
_196.append("&lang=").append(schmapplet.lang);
}
if(schmapplet.schmapmap){
_196.append("&schmapmap=").append(schmapplet.schmapmap);
}
_196.append("#mapview=").append(schmapplet.mapview);
_196.append("&tab=").append(tabs[schmapplet.tabOrder].tabRealView);
if(fixedPlace!=null){
_196.append("&placeid=");
_196.append(fixedPlace);
}
_196.append("&c=").append(colorset);
var s=Map_object.schmapplet_s.split(" ");
_196.append("&topleft=").append(s[0]).append(",").append(s[1]);
_196.append("&bottomright=").append(s[2]).append(",").append(s[3]);
if(autoplayUrl!=null){
_196.append("&autoplay=").append(schmapplet.autoplay);
}
if(showMenusFromUrl!=null){
_196.append("&showMenus=").append(showMenusFromUrl);
}
window.open(_196.toString(),"","width=1010, height=790, scrollbars=yes, menubar=no, resizable=yes,status=no");
$("GetSchmappletText").style.visibility="hidden";
}
function showSchmappletTextPanel(evt){
if(showed){
return;
}
var _19b=0.3;
if(schmapplet.getWidgetPanel&&schmapplet.getWidgetPanel.length>20&&templateChanged){
$("GetSchmappletText").innerHTML=schmapplet.getWidgetPanel;
templateChanged=0;
analyticsConnect("code","onclick",clickselect,analyticsHooks.copyCodeLeft);
if($("GetSchmappletText").firstChild.nodeType==3){
removeElement($("GetSchmappletText").firstChild);
}
}
schmapplet.delay=callLater(_19b,function(){
if(!schmapplet.delay){
return;
}
getThisWidgetPauseTimerId=setTimeout("pausedOverGetTHisWidgetPanel()",5000);
getThisWidgetPauseTimerId=setTimeout("pausedOverGetTHisWidgetPanel()",5000);
showed=true;
if(isIE6){
var ct=$("codetext");
if(ct.clientWidth>$("GetSchmappletText").clientWidth){
setElementDimensions("code",{w:ct.clientWidth-21});
}else{
setElementDimensions("code",{w:ct.clientWidth-5});
}
}
autoPause();
if(typeof (xparams)!="undefined"&&typeof (xparams.urlCode)!="undefined"&&xparams.urlCode!=""){
iframeAnchor="<a href=\"http://www.schmap.com/widgets/"+xparams.urlCode+"\">"+xparams["iframeUrlText"]+"</a>";
}else{
iframeAnchor="";
}
iframeCode=getiFrameSrc();
if($("code")){
$("code").value=concat(["<iframe id=\"schmapplet\" frameborder=\"0\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" allowTransparency=\"true\" style=\"border-style:none; border-width:0px;\" width=\"",document.body.clientWidth,"\" height=\"",document.body.clientHeight,"\" src=\"",iframeCode,"\">",iframeAnchor,"</iframe>"]);
}
$("GetSchmappletText").style.visibility="visible";
analyticsConnect("custom-link","onclick",function(){
},analyticsHooks.customizeLink);
});
}
function pausedOverGetTHisWidgetPanel(){
if(trackPage){
pageTracker._trackPageview(analyticsHooks.getthiswidget5s.text);
}
}
function showGuideHotSwap(evt){
var _19e=0.2;
if($("guide-hotswap-div").innerHTML==""){
$("guide-hotswap-div").innerHTML=guideHtml;
}
if(settings.MiniMenuOverrideName!="undefined"&&settings.MiniMenuOverrideName!=null&&settings.MiniMenuOverrideName.length>0){
var _19f="/xml/"+settings.MiniMenuOverrideName;
guideSrcXml="/common/minicitiesmenu.html?"+_19f+"&Countries";
truncationNeeded=0;
}else{
var _19f="/xml/mininavmenu.xml";
truncationNeeded=1;
}
schmapplet.delay=callLater(_19e,function(){
if(!schmapplet.delay){
return;
}
if(guideLoaded==0){
loadCountriesInfo(_19f);
$("guide-hotswap-frame").contentWindow.location.replace(guideSrcXml);
guideLoaded=1;
}
if(isSafari){
changeIframe();
}
guide_hotswap_showed=true;
section_hotswap_showed=false;
$("guide-hotswap-div").style.visibility="visible";
$("guide-hotswap-frame").style.visibility="visible";
$("section-hotswap-div").style.visibility="hidden";
if($("section-hotswap-frame")){
$("section-hotswap-frame").style.visibility="hidden";
}
$("loading-message-guide").style.visibility="hidden";
if(!(BrowserDetect.browser==="Firefox"||isSafari)){
try{
window.frames["guide-hotswap-frame"].window.mainAlign();
}
catch(e){
}
}else{
var _1a0=getElementDimensions("canvas").h;
var _1a1=getElementDimensions("canvas").w;
var temW=_1a1-6;
var temH=_1a0-24-23;
setElementDimensions("guide-hotswap-frame",{h:temH,w:temW});
window.frames["guide-hotswap-frame"].window.mainAlign();
}
});
autoPause();
}
function showSectionHotSwap(evt){
var _1a5=0.2;
if(section_hotswap_showed){
return;
}
if($("section-hotswap-div").innerHTML==""){
$("section-hotswap-div").innerHTML=sectionHtml;
}
schmapplet.delay=callLater(_1a5,function(){
if(!schmapplet.delay){
return;
}
if(sectionLoaded==0){
sectionSrcXml=getSectionSrcXml(schmapplet.uid,settings.MiniMenu2OverrideName);
$("section-hotswap-frame").contentWindow.document.body.innerHTML="";
$("section-hotswap-frame").contentWindow.location.replace(sectionSrcXml);
sectionLoaded=1;
}
section_hotswap_showed=true;
if(isSafari){
changeIframe();
}
guide_hotswap_showed=false;
$("section-hotswap-div").style.visibility="visible";
$("section-hotswap-frame").style.visibility="visible";
$("guide-hotswap-div").style.visibility="hidden";
if(!(BrowserDetect.browser==="Firefox"||isSafari)){
try{
window.frames["section-hotswap-frame"].window.mainAlign();
}
catch(e){
}
}else{
var _1a6=getElementDimensions("canvas").h;
var _1a7=getElementDimensions("canvas").w;
var temW=_1a7-6;
var temH=_1a6-24-23;
setElementDimensions("section-hotswap-frame",{h:temH,w:temW});
window.frames["section-hotswap-frame"].window.mainAlign();
}
});
autoPause();
}
function flashPlayButton(evt){
try{
if(!evt){
num++;
}
if(num%2){
hideElement(settings.playb);
showElement(settings.playf);
}else{
hideElement(settings.playf);
showElement(settings.playb);
}
if(num==schmapplet.cycleTime){
cyclePlace();
num=0;
}
flash_d=callLater(flashTime,flashPlayButton);
}
catch(err){
logException(err,"7.");
}
}
function stopFlashPlayButton(){
try{
if(flash_d){
flash_d.cancel();
flash_d=null;
showElement(settings.playb);
hideElement(settings.playf);
}
}
catch(err){
logException(err,"8.");
}
}
function spotRestore(){
try{
schmapplet.places[schmapplet.selected].unhighlight();
if(typeof (schmapplet.placeid)!="undefined"&&schmapplet.placeid.length>0){
var _1ab=schmapplet.placesById[schmapplet.placeid];
if(_1ab!==undefined){
schmapplet.selected=_1ab;
schmapplet.places[schmapplet.selected].highlight(null,true);
setCurrentCounter(schmapplet.selected+1);
}
}
}
catch(err){
logException(err,"9.");
}
}
function placeClick(evt){
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=schmapplet.placesById[this.placeid]-1;
}
if(isPlaceOnly){
var _1ad=0;
schmapplet.selected=0;
}else{
var _1ad=schmapplet.places[schmapplet.selected].id;
}
if(zoomLevel>0){
zoomInOut.apply("zoom-p");
if(schmapplet.places[schmapplet.selected].marker){
schmapplet.places[schmapplet.selected].marker.hide();
}
if(schmapplet.places[schmapplet.selected].Gmarker){
schmapplet.places[schmapplet.selected].Gmarker.hide();
}
}else{
if(fixedPlace===_1ad){
ifAutoPlay(schmapplet.autoplay);
fixedPlace=null;
if(autoPlaying){
autoPlayPaused=false;
}
if(schmapplet.places[schmapplet.selected].markerbig){
schmapplet.places[schmapplet.selected].markerbig.hide();
schmapplet.places[schmapplet.selected].marker.show();
}
if(schmapplet.places[schmapplet.selected].Gmarkerbig){
schmapplet.places[schmapplet.selected].Gmarkerbig.hide();
schmapplet.places[schmapplet.selected].Gmarker.show();
}
}else{
ifAutoPlay(false);
if(schmapplet.uplace&&_1ad==schmapplet.uplace.id){
fixedPlace=null;
}else{
fixedPlace=_1ad;
}
schmapplet.placeid=_1ad;
if(schmapplet.places[schmapplet.selected].marker){
schmapplet.places[schmapplet.selected].marker.hide();
schmapplet.places[schmapplet.selected].markerbig.show();
}
if(schmapplet.places[schmapplet.selected].Gmarker){
schmapplet.places[schmapplet.selected].Gmarker.hide();
schmapplet.places[schmapplet.selected].Gmarkerbig.show();
}
}
}
updateParentIframeCode();
}
function spotClick(evt){
try{
if(schmapplet.places[schmapplet.selected].id===this.placeid){
schmapplet.places[schmapplet.selected].highlight(null,true);
schmapplet.placeid=this.placeid;
if(zoomLevel>0){
if(schmapplet.places[schmapplet.selected].zoomedIn){
if(isIE6||isIE7){
var _1af="/images/zoomout.cur";
}else{
var _1af="-moz-zoom-out";
}
}else{
if(isIE6||isIE7){
var _1af="/images/zoom.cur";
}else{
var _1af="-moz-zoom-in";
}
}
if(schmapplet.places[schmapplet.selected].marker){
setStyle(schmapplet.places[schmapplet.selected].markerbig.getElement(),{"cursor":_1af});
setStyle(schmapplet.places[schmapplet.selected].marker.getElement(),{"cursor":_1af});
}
if(schmapplet.places[schmapplet.selected].Gmarker){
setStyle(schmapplet.places[schmapplet.selected].Gmarkerbig.getElement(),{"cursor":_1af});
setStyle(schmapplet.places[schmapplet.selected].Gmarker.getElement(),{"cursor":_1af});
}
}
return;
}
schmapplet.places[schmapplet.selected].unhighlight();
if(placesChecked&&schmapplet.uplace){
schmapplet.selected=schmapplet.placesById[this.placeid]-1;
if(schmapplet.selected<0){
schmapplet.selected=0;
}
}else{
schmapplet.selected=schmapplet.placesById[this.placeid];
}
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
schmapplet.places[schmapplet.selected].highlight(null,true);
if(zoomLevel>0){
if(schmapplet.places[schmapplet.selected].zoomedIn){
if(isIE6||isIE7){
var _1af="/images/zoomout.cur";
}else{
var _1af="-moz-zoom-out";
}
}else{
if(isIE6||isIE7){
var _1af="/images/zoom.cur";
}else{
var _1af="-moz-zoom-in";
}
}
if(schmapplet.places[schmapplet.selected].marker){
setStyle(schmapplet.places[schmapplet.selected].markerbig.getElement(),{"cursor":_1af});
setStyle(schmapplet.places[schmapplet.selected].marker.getElement(),{"cursor":_1af});
}
if(schmapplet.places[schmapplet.selected].Gmarker){
setStyle(schmapplet.places[schmapplet.selected].Gmarkerbig.getElement(),{"cursor":_1af});
setStyle(schmapplet.places[schmapplet.selected].Gmarker.getElement(),{"cursor":_1af});
}
}
setCurrentCounter(schmapplet.selected+1);
}
catch(err){
logException(err,"spotClick: "+schmapplet.selected+".");
}
if(typeof (evt.stop)=="function"){
evt.stop();
}
}
function waitForWidth(flag){
logDebug("flag",flag);
if(!loadingNewMap&&typeof (schmapplet.map)!="undefined"){
return false;
}
logTime("stat load map");
if(MochiKit.Maps===undefined){
if(flag){
connect(window,"MochiMaps-load",zoomInOut);
}else{
connect(window,"MochiMaps-load",waitForWidth);
}
$("map2").innerHTML="<p style=\"height: 100%; background-color: #c0c0c0;\">loading map...</p>";
setStyle("map2",{visibility:"visible"});
importGMapUrl();
return true;
}
loadingNewMap=false;
try{
if($("map").clientWidth<=0){
callLater(gmapTime,waitForWidth);
return;
}
var _1b1=map_api_order.length;
var mapi=findArgument("mapapi");
unshiftElement(map_api_order,mapi);
for(var i=0;i<_1b1;i++){
var _1b4=map_api_order[i];
MochiKit.Maps=MochiKit["Maps__"+_1b4];
try{
Make_Map();
break;
}
catch(e){
logException(e,"Make_Map: ");
replaceChildNodes("map");
}
}
}
catch(err){
logException(err,"11.");
}
return false;
}
PlaceObj.prototype.connectMarkerSignals=function(){
var _1b5=1;
if((typeof (schmapplet.usingSTemplate)!="undefined")&&schmapplet.usingSTemplate==1){
if(place.tel.length){
_1b5=2;
}
}
if(typeof (this.marker.eventAttachPriority)=="undefined"||_1b5>this.marker.eventAttachPriority){
analyticsConnect(this.markerbig,"click",placeClick,analyticsHooks.mapIconClick,true);
analyticsConnect(this.marker,"click",placeClick,analyticsHooks.mapIconClick,true);
connect(this.markerbig,"mouseout",spotRestore);
connect(this.marker,"mouseover",spotClick);
connect(this.markerbig,"mouseover",spotClick);
this.marker.eventAttachPriority=_1b5;
this.markerbig.placeid=place.id;
this.marker.placeid=place.id;
}
};
PlaceObj.prototype.connectGMarkerSignals=function(){
analyticsConnect(this.Gmarkerbig,"click",placeClick,analyticsHooks.mapIconClick,true);
analyticsConnect(this.Gmarker,"click",placeClick,analyticsHooks.mapIconClick,true);
connect(this.Gmarkerbig,"mouseout",spotRestore);
connect(this.Gmarker,"mouseover",spotClick);
connect(this.Gmarkerbig,"mouseover",spotClick);
};
function rebuildMapDiv(){
clearMapLeaks();
removeElement("map");
appendChildNodes("canvas",DIV({id:"map"}));
if(typeof (schmapplet.ultranarrow)!="undefined"&&schmapplet.ultranarrow.toLowerCase()=="true"){
$("map").style.left="2px";
$("map").style.right="2px";
}
if(isGuideSchmapplet){
var _1b6=38;
setStyle("map",{"top":_1b6+"px"});
}
if(isIE6){
unbreakIE();
}
connect("map","onmouseover",autoPauseEx);
connect("map","onmouseout",autoPlayEx);
}
function loadSchmapMapData(dir,_1b8,_1b9){
loadingNewSchmapplet=true;
var path=[dir,"xparams.sjs"].join("/");
if(schmapplet.map){
schmapplet.map.loadNewData(path);
schmapplet.toLoadNewData=false;
}else{
schmapplet.toLoadNewData=path;
}
if(!loadingEmptyGuide){
if($("section-hotswap-frame")!=null){
$("section-hotswap-frame").style.visibility="hidden";
$("loading-message-guide").style.visibility="visible";
}
$("guide-hotswap-div").style.visibility="visible";
if($("guide-hotswap-frame")!=null){
$("guide-hotswap-frame").style.visibility="hidden";
$("loading-message-guide").style.visibility="visible";
}
}
addScript(path,loadNewPlaces,_1b8,_1b9);
}
function centerMap(){
schmapplet.map.setDisplay(schmapplet.bounds.getCenter(),0.55);
}
function Make_Map(){
if(initialized){
rebuildMapDiv();
}
$("map").innerHTML="";
schmapplet.readyToMakeIcons=true;
schmapplet.map=new MochiKit.Maps.Map("map");
try{
schmapplet.origbounds=MochiKit.Maps.Bounds.fromGeoRSS(Map_object.origGeoBox);
schmapplet.bounds=MochiKit.Maps.Bounds.fromGeoRSS(Map_object.schmapplet_s);
}
catch(e){
logException(e,"Make_Map.");
}
logDebug("initialized",initialized);
if(schmapplet.toLoadNewData){
schmapplet.map.loadNewData(schmapplet.toLoadNewData);
}
logTime("Finished Making map");
centerMaps();
schmapplet.actualOrigBounds=schmapplet.map.actualBoundsFromIdealBounds(schmapplet.origbounds);
if(schmapplet.map.provider=="s"){
schmapplet.map.setDisplay(schmapplet.origbounds.getCenter());
}
if(schmapplet.mapview!="Map"||(typeof (schmapplet.places[schmapplet.selected])!="undefined"&&schmapplet.places[schmapplet.selected].zoomedIn)){
callLater(0.1,function(){
if(schmapplet.places[schmapplet.selected].zoomedIn){
schmapplet.map.setMapType(settings.ZoomMode);
if((schmapplet.map.hideAll!==undefined)){
schmapplet.map.hideAll(true);
}
}else{
schmapplet.map.setMapType(schmapplet.mapview);
}
});
}
$("map").style.position="absolute";
$("map2").style.position="absolute";
if(isIE6){
if(!unbreakIERun){
unbreakIE();
}
}else{
$("map").style.width="";
$("map").style.height="";
$("map2").style.width="";
$("map2").style.height="";
}
schmapplet.marker=false;
schmapplet.nextIconToMake=undefined;
if(schmapplet.map.provider=="s"||schmapplet.map.provider=="c"){
schmapplet.needGoogle=true;
}else{
schmapplet.needGoogle=false;
}
callLater(0.1,partial(makeIcons,MochiKit.Maps));
setStyle("map2",{visibility:"hidden"});
if(schmapplet.places[schmapplet.selected].gmarkerbig){
schmapplet.places[schmapplet.selected].gmarkerbig.hide();
}
}
function postMakeIcons1(map){
schmapplet.places[schmapplet.selected].maphighlight();
setStyle("subtitle-ie",{"height":"30px"});
if(map.provider!="s"&&!schmapplet.places[schmapplet.selected].zoomedIn){
centerMaps();
}
connect(map,"load",mapsUpdate);
connect(map,"zoomend",mapsUpdate);
connect(map,"moveend",mapsUpdate);
}
function postMakeIcons2(){
schmapplet.places[schmapplet.selected].markerbig.show();
if(schmapplet.places[schmapplet.selected].Gmarkerbig){
schmapplet.places[schmapplet.selected].Gmarkerbig.show();
}
if(isIE6){
schmapplet.map.fixSize();
}
try{
if(settings["MapLink"]=="true"&&removeLinks==false){
connect(schmapplet.map.markersElement,"onclick",mainTitlGo);
setStyle(schmapplet.map.markersElement,{"cursor":"pointer"});
connect(schmapplet.map.imgElement,"onclick",mainTitlGo);
setStyle(schmapplet.map.imgElement,{"cursor":"pointer"});
}
logTime("end of makeing  iframes  ",true);
}
catch(e){
}
}
function updateParentIframeCode(){
try{
if(parent){
if(parent.changeIframeCode){
iframeCode=getiFrameSrc();
parent.changeIframeCode(iframeCode);
parent.changeAutoPlay(schmapplet.autoplay);
}
}
}
catch(e){
}
}
function captureWheel(_1bc){
stopPropagation(_1bc);
preventDefault(_1bc);
}
function loopTillPhotoMet(){
try{
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
if(schmapplet.places[schmapplet.selected].photo_objs.length==0){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
var _1bd=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].photo_objs.length<=0){
schmapplet.selected+=1;
if(schmapplet.selected==schmapplet.places.length){
schmapplet.selected=0;
}
if(_1bd==schmapplet.selected){
break;
}
}
schmapplet.selectedPhoto=0;
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
}
}
catch(err){
logException(err,"4444.");
}
}
function loopTillStatsMet(){
try{
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
if(schmapplet.places[schmapplet.selected].ldesc==""){
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected-=1;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
var _1be=schmapplet.selected;
while(schmapplet.places[schmapplet.selected].ldesc==""){
schmapplet.selected--;
if(schmapplet.selected<0){
schmapplet.selected=schmapplet.places.length-1;
}
if(_1be==schmapplet.selected){
break;
}
}
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
}
}
catch(err){
logException(err,"4444.");
}
}
function changeViewByOrder(_1bf,_1c0,flag){
if(_1bf>=tabs.length){
_1bf=tabs.length-1;
}
var _1c2=tabs[_1c0].tabRealView;
if(noPhotosAtAll&&_1c2=="photos"){
return;
}
if(isPhotoView||_1c2=="photos"){
createTopPhotoTable();
if(schmapplet.IEquirks||BrowserDetect.browser=="Safari"){
if(schmapplet.mycurrent_cellTD){
setStyle(schmapplet.mycurrent_cellTD,{"height":(Math.abs(document.body.clientHeight-160-16))+"px"});
setStyle("photo-button",{"width":(document.body.clientWidth-22)+"px"});
}
}
makeLargePhotos();
}
var _1c3=false;
schmapplet.selectedPhoto=0;
if(tabs[_1bf].tabType=="maptitle"){
}else{
$("place-name-top").style.visibility="hidden";
}
if(tabs[_1bf].tabType=="miniphotostitle"&&tabs[_1c0].tabType!="miniphotostitle"){
setStyle("photos",{"z-index":"4"});
setStyle("loading-message-guide",{"visibility":"hidden"});
}else{
setStyle("photos",{"z-index":"6"});
}
if(tabs[_1c0].tabType!="maptitle"&&tabs[_1c0].tabType!="htmltitle"&&tabs[_1c0].tabType!="miniphotostitle"&&tabs[_1c0].tabType!="htmltitle1"){
$("place-name-top").style.visibility="visible";
if(tabs[_1c0].tabType=="miniphotostitle"){
_1c3=true;
}
}
if(tabs[_1c0].hasDetail=="no"){
hideElement("place-info");
tabs[_1c0].tabDiv.style.bottom="34px";
}else{
showElement("place-info");
var _1c4=getElementDimensions("place-info").h;
tabs[_1c0].tabDiv.style.bottom=_1c4+34+"px";
}
if(_1c2=="photos"){
_1c3=true;
loopTillPhotoMet();
}
if(isPhotoView!=_1c3){
if(_1c3){
autoPlay();
}else{
autoPause();
}
isPhotoView=_1c3;
}
schmapplet.view=_1c2;
schmapplet.tabOrder=_1c0;
schmapplet.tabLink=tabs[_1c0].tabRealView;
removeElementClass("view-link"+_1bf,"current-view-link");
addElementClass("view-link"+_1c0,"current-view-link");
if(typeof (schmapplet.places[schmapplet.selected])!="undefined"){
schmapplet.places[schmapplet.selected].highlight();
}else{
schmapplet.places[0].highlight();
}
var _1c5=$("view-panel").clientWidth;
if(tabs[_1c0].tabType=="htmltitle"){
$("schedule").style.visibility="visible";
schmapplet.htmlPanelClick=true;
if(initialized){
if(schmapplet.tabLinkOrder!=_1c0&&$("schedule").currentIndex){
jugdescroll($("schedule"));
}
}
if(typeof (schmapplet.comingGame)!="undefined"&&schmapplet.comingGame!=null){
changeBG.apply(schmapplet.comingGame);
schmapplet.selected=schmapplet.comingGame.num-1;
}
ifAutoPlay(false);
}else{
if(schmapplet.gameDayArray!==undefined){
removeElementClass(schmapplet.gameDayArray[schmapplet.selected],"backDay");
addElementClass(schmapplet.gameDayArray[schmapplet.selected],"schedule");
}
schmapplet.htmlPanelClick=false;
}
if(tabs[_1bf].tabType=="maptitle"){
}else{
if(tabs[_1bf].tabRealView=="details"&&(isSafari||isMacintosh)){
hideElement("details");
}else{
$(tabs[_1bf].tabRealView).style.visibility="hidden";
}
}
if(tabs[_1c0].tabType=="maptitle"){
if($("photo-table")){
$("photo-table").style.visibility="hidden";
}
ifAutoPlay(schmapplet.autoplay);
if(!flag){
waitForWidth();
}
}else{
if(tabs[_1c0].tabRealView=="details"&&(isSafari||isMacintosh)){
showElement("details");
}else{
$(tabs[_1c0].tabRealView).style.visibility="visible";
}
}
repositionPlaceStripIcons(_1c5);
if(tabs[_1c0].tabType=="htmltitle1"){
ifAutoPlay(false);
isStatsView=true;
loopTillStatsMet();
jugdescroll($("stats"));
}else{
isStatsView=false;
}
updateParentIframeCode();
try{
parent.updateRadios(tabs.length);
}
catch(e){
}
}
function changeView(){
var _1c6=schmapplet.tabOrder;
if(_1c6>=tabs.length){
_1c6=tabs.length-1;
}
var _1c7=tabs[_1c6].tabRealView;
var _1c8=this.order;
if(_1c8===undefined){
_1c8=0;
}
var _1c9=tabs[_1c8].tabRealView;
if(_1c9==_1c7){
return;
}
changeViewByOrder(_1c6,_1c8);
try{
parent.changeView(this.innerHTML);
}
catch(e){
}
if(schmapplet.IEquirks||BrowserDetect.browser=="Safari"){
if(schmapplet.mycurrent_cellTD){
setStyle(schmapplet.mycurrent_cellTD,{"height":((document.body.clientHeight-160)-16)+"px"});
setStyle("photo-button",{"width":(document.body.clientWidth-22)+"px"});
adjustPhotoTab();
}
}
}
function showView(_1ca){
$("GetSchmappletText").style.visibility="hidden";
$("section-hotswap-div").style.visibility="hidden";
$("place-name-top").style.visibility="hidden";
var _1cb=tabViews.length;
for(var i=1;i<_1cb;i++){
var _1cd=tabViews[i];
if(_1cd=="details"&&(isSafari||isMacintosh)){
hideElement("details");
}else{
$(_1cd).style.visibility="hidden";
}
}
if(tabs[_1ca].tabType=="detailtitle"){
$("place-name-top").style.visibility="visible";
}
if(tabs[_1ca].tabType=="maptitle"){
$("map").style.visibility="visible";
}else{
if(tabs[_1ca].tabRealView=="details"&&(isSafari||isMacintosh)){
showElement(tabs[_1ca].tabRealView);
}else{
$(tabs[_1ca].tabRealView).style.visibility="visible";
}
}
addElementClass("view-link"+_1ca,"current-view-link");
}
function autoPlayEx(evt){
if(schmapplet.pauseClick||schmapplet.htmlPanelClick){
return;
}
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var pos=getElementPosition("GetSchmappletText");
var dim=getElementDimensions("GetSchmappletText");
if(schmapplet.IEquirks){
mx+=1;
my+=1;
}
if(flash_d==null){
flash_d=callLater(flashTime,flashPlayButton);
}
autoPlay();
}
function autoPauseEx(){
if(isPhotoView){
var _1d3=this.id;
if(_1d3.match(/^view-link\d$/)||_1d3=="place-info"){
return;
}
}
autoPause();
}
function autoPause(){
autoPausedByParent=false;
if(autoPlaying){
stopCycling();
if(autoPlaying){
autoPlayPaused=true;
}
}
}
function autoPlay(evt){
if(!schmapplet.autoplay){
return;
}
if(autoPlayStopped||schmapplet.pauseClick||schmapplet.htmlPanelClick){
return;
}
try{
autoPausedByParent=false;
if(autoPlaying&&autoPlayPaused){
autoPlayPaused=false;
if(!flash_d){
num=0;
flashPlayButton(1);
}
}
}
catch(err){
logException(err,"12.");
}
}
function findArgument(name){
var arg=window.location.href.split(name+"=");
if(arg.length<2){
return "";
}
arg=arg[1].split("&");
return arg[0];
}
function checkArgs(){
var _1d7=window.location.hash;
var arg=findArgument("c");
if(colorset!=arg){
colorset=arg;
changingColor(colorset);
}
arg=findArgument("placeid");
if(arg.length&&schmapplet.placeidUrl!=arg){
logDebug("got placeid:",arg,"in",_1d7);
if(arg=="-"){
if(autoPausedByParent&&autoPlayPaused){
autoPlay();
}
}else{
schmapplet.placeidUrl=arg;
schmapplet.placeid=arg;
var _1d9=schmapplet.placesById[arg];
if((_1d9!==undefined)&&(_1d9!=schmapplet.selected)){
if(!autoPlayPaused){
autoPause();
autoPausedByParent=true;
}
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected=_1d9;
schmapplet.places[schmapplet.selected].highlight();
setCurrentCounter(schmapplet.selected+1);
}
}
}
var _1da=findArgument("mapview");
if(_1da.length&&_1da!=schmapplet.mapview){
schmapplet.mapview=_1da;
changeMapType(_1da);
}
arg=findArgument("mapapi");
if(arg.length&&arg!=schmapplet.mapapi){
schmapplet.mapapi=arg;
logDebug("got mapapi:",arg,"in",_1d7);
var _1db=MochiKit.Maps;
var _1dc=MochiKit["Maps__"+arg];
if((_1dc!==undefined)&&(_1dc.Map!==undefined)){
try{
MochiKit.Maps=_1dc;
Make_Map();
if(isIE6){
unbreakIE();
}
}
catch(e){
MochiKit.Maps=_1db;
Make_Map();
}
}
}
}
function updateHashParams(name,_1de){
var hp=getHashParams();
var _1e0=document.location.href.split("#")[0];
for(var p in hp){
if(p==name){
hp[p]=_1de;
}else{
}
}
var _1e2="";
for(var p in hp){
if(hp[p]){
_1e2+=p.concat("=",hp[p],"&");
}
}
_1e2=_1e2.substring(0,_1e2.length-1);
document.location.replace(_1e0+"#"+_1e2);
}
function showCustomizePage(){
var _1e3=new StringBuffer();
_1e3.append("/templates/customize.html?width=230&height=450&tid=t010&tname=");
var _1e4=window.location.pathname;
var _1e5=_1e4.substring(_1e4.lastIndexOf("/")+1).replace(".html","");
_1e3.append(_1e5).append("&uid=").append(schmapplet.uid);
_1e3.append("&sid=").append(schmapplet.sid).append("#c=");
_1e3.append(colorset);
window.open(_1e3.toString(),"customizea","width=950, height=650, scrollbars=no, resizable=no");
}
function printPlace(_1e6){
if(typeof (_1e6.stop)!="undefined"){
_1e6.stop();
}
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
window.printLoaded=true;
var _1e7=schmapplet.places[schmapplet.selected];
getAllPhotos(_1e7);
window.printPlace=_1e7;
if(typeof (settings.PlacePrintHtml)=="undefined"){
settings.PlacePrintHtml="/common/printplace.html?type=guide";
}
url=settings.PlacePrintHtml+"&map=g";
window.open(url,"printPlace","height=600,width=800,top=0, left=0, toolbar=yes, menubar=yes, scrollbars=yes, resizable=no,location=no, status=no");
}
function showDriveDirections(_1e8){
if(schmapplet.places[schmapplet.selected].stickyPlaceType==2){
window.open("http://www.mapquest.com/directions/");
}else{
var _1e9=schmapplet.places[schmapplet.selected].id;
var url_=new StringBuffer();
url_.append("http://www.schmap.com/app/gle?gc=L003&lv=").append(_1e9);
window.open(url_);
}
}
function zoomInOut(_1eb){
if(schmapplet.zoomLinkOver){
window.open(schmapplet.zoomLinkOver);
return;
}
var _1ec=schmapplet.tabOrder;
if(tabs[_1ec].tabType!="maptitle"){
var _1ed=tabs.length;
for(var i=0;i<_1ed;i++){
var _1ef=tabs[i];
if(_1ef.tabType=="maptitle"){
break;
}
}
if(i<_1ed){
changeViewByOrder(_1ec,i,true);
}
}
if(waitForWidth(true)){
return;
}
if(_1eb&&_1eb.stop!==undefined){
_1eb.stop();
}
logDebug("zoomInOut");
var _1f0=$("place-info").clientWidth;
var map=schmapplet.map;
var _1f2=schmapplet.places[schmapplet.selected].geocode;
if(schmapplet.needGoogle){
if(MochiKit.Maps__Google===undefined){
connect(window,"MochiMaps-load",zoomInOut);
$("map2").innerHTML="<p style=\"height: 100%; background-color: #c0c0c0;\">loading map...</p>";
setStyle("map2",{visibility:"visible"});
importGMapUrl();
return;
}else{
if(schmapplet.map2===undefined){
$("map2").innerHTML="";
schmapplet.map2=new MochiKit.Maps__Google.Map("map2");
if(schmapplet.map.provider=="c"){
schmapplet.nextIconToMake=undefined;
callLater(0.1,partial(makeIcons,MochiKit.Maps__Google,schmapplet.map2));
}
}
}
map=schmapplet.map2;
if(schmapplet.places[schmapplet.selected].gpoint===undefined){
_1f2=new MochiKit.Maps__Google.Point(_1f2.latitude,_1f2.longitude);
schmapplet.places[schmapplet.selected].gpoint=_1f2;
}else{
_1f2=schmapplet.places[schmapplet.selected].gpoint;
}
}
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
var _1f3=schmapplet.places[schmapplet.selected].id;
if(fixedPlace===_1f3){
fixedPlace=null;
}else{
if(schmapplet.uplace&&_1f3==schmapplet.uplace.id){
fixedPlace=null;
}else{
fixedPlace=_1f3;
}
}
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
if(schmapplet.places[schmapplet.selected].zoomedIn){
schmapplet.places[schmapplet.selected].zoomedIn=false;
setStyle("map2",{visibility:"hidden"});
if(schmapplet.places[schmapplet.selected].gmarkerbig){
schmapplet.places[schmapplet.selected].gmarkerbig.hide();
}
if(!schmapplet.needGoogle||schmapplet.mapResized){
schmapplet.map.setDisplay(schmapplet.origbounds.getCenter(),0.55);
schmapplet.map.zoomToBounds(schmapplet.origbounds);
}
schmapplet.mapResized=false;
if(!(schmapplet.usingSTemplate)){
if(settings.UseFunctionIcons!=="undefined"&&settings.UseFunctionIcons.match(/^true$/i)){
showElement(settings.zoomin);
hideElement(settings.zoomout);
}else{
$("zoom-p").innerHTML=settings.ZoomText;
}
}else{
$("zoom-p").innerHTML=settings.ZoomText;
var _1f4=schmapplet.places[schmapplet.selected].name;
if(_1f4.length*8>_1f0){
var _1f5=Math.round(_1f0/8);
var _1f6=_1f4;
if(_1f5+3<=_1f4.length){
_1f4=_1f6.substr(0,_1f5)+"...";
}else{
_1f4=schmapplet.places[schmapplet.selected].name;
}
}else{
_1f4=schmapplet.places[schmapplet.selected].name;
}
var _1f7=new StringBuffer();
if(settings["StripTitleLink"]=="true"&&schmapplet.places[schmapplet.selected].url!==""){
_1f7.append("<a href=\"").append(schmapplet.places[schmapplet.selected].url).append("\" target=\"blank\">").append(schmapplet.places[schmapplet.selected].name).append("</a>");
}else{
_1f7.append(_1f4);
}
$("TitleIn").innerHTML=_1f7.toString();
}
schmapplet.zoomedIn=false;
if(typeof (settings.ZoomMode)=="string"){
schmapplet.map.setMapType(schmapplet.mapview);
}
if(autoPlaying&&!flash_d){
ifAutoPlay(schmapplet.autoplay);
}
if((settings.ZoomHideIcons!==undefined)&&(schmapplet.map.hideAll!==undefined)){
schmapplet.map.hideAll(false);
}
}else{
var _1f8=schmapplet.places.length;
for(var k=0;k<_1f8;k++){
var _1fa=schmapplet.places[k];
_1fa.zoomedIn=false;
}
schmapplet.places[schmapplet.selected].zoomedIn=true;
if(schmapplet.needGoogle){
setStyle("map2",{visibility:"visible"});
}
if(!_1f2){
_1f2=new MochiKit.Maps.Point(schmapplet.places[schmapplet.selected].geo[0],schmapplet.places[schmapplet.selected].geo[1]);
}
map.setDisplay(_1f2,zoomLevel);
if(typeof (settings.ZoomMode)=="string"){
map.setMapType(settings.ZoomMode);
}
ifAutoPlay(false);
if(schmapplet.needGoogle){
createGMarker(map,schmapplet.places[schmapplet.selected]);
}
schmapplet.zoomedIn=true;
if(!(schmapplet.usingSTemplate)){
if(settings.UseFunctionIcons!=="undefined"&&settings.UseFunctionIcons.match(/^true$/i)){
showElement(settings.zoomout);
hideElement(settings.zoomin);
}else{
$("zoom-p").innerHTML=settings.ZoomOutText;
}
}else{
$("zoom-p").innerHTML=settings.ZoomOutText;
var _1f4=schmapplet.places[schmapplet.selected].addr2;
$("TitleIn").initTxt=_1f4;
var _1fb=getTrunction("TitleIn",_1f0,9);
$("TitleIn").innerHTML=_1fb;
}
}
}
function zoomOut(_1fc){
if(typeof (schmapplet.selected)=="undefined"){
schmapplet.selected=0;
}
if(schmapplet.places[schmapplet.selected].zoomedIn){
schmapplet.places[schmapplet.selected].zoomedIn=false;
if(settings.UseFunctionIcons!=="undefined"&&settings.UseFunctionIcons.match(/^true$/i)){
showElement(settings.zoomin);
hideElement(settings.zoomout);
}else{
$("zoom-p").innerHTML=settings.ZoomText;
}
}
var _1fd=schmapplet.places[schmapplet.selected].id;
if(fixedPlace===_1fd){
fixedPlace=null;
schmapplet.placeid=schmapplet.places[0].id;
}else{
if(schmapplet.uplace&&_1fd==schmapplet.uplace.id){
fixedPlace=null;
}else{
fixedPlace=_1fd;
}
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
}
schmapplet.map.setDisplay(schmapplet.origbounds.getCenter(),0.55);
schmapplet.map.zoomToBounds(schmapplet.origbounds);
if(typeof (_1fc.stop)!="undefined"){
_1fc.stop();
}
}
function changeStyleSheetColor(_1fe,_1ff,_200){
var _201=document.styleSheets.length;
for(var i=0;i<_201;i++){
var _203=document.styleSheets[i];
var s=_203;
if(!s||!s.href){
continue;
}
if(!s.href.match(/embedded.css$/)){
continue;
}
var _205=s.cssRules||s.rules;
var _206=_205.length;
for(var i2=0;i2<_206;i2++){
var r=_205[i2];
var st=r.selectorText;
if(st.indexOf(_1fe)<0){
continue;
}
var _20a=r.style;
if(schmapplet.colorset[_200]){
try{
_20a[_1ff]="#"+schmapplet.colorset[_200];
}
catch(e){
}
}
break;
}
break;
}
}
function changeStyleSheet(_20b,_20c,_20d){
var _20e=document.styleSheets.length;
for(var i=0;i<_20e;i++){
var s=document.styleSheets[i];
if(!s.href.match(/embedded.css$/)){
continue;
}
var _211=s.cssRules||s.rules;
var _212=_211.length;
for(var i2=0;i2<_212;i2++){
var r=_211[i2];
var st=r.selectorText;
if(st.indexOf(_20b)<0){
continue;
}
var _216=r.style;
for(property in _216){
if(_216[property]){
}
}
if(_216[_20c]){
try{
_216[_20c]=_20d;
}
catch(e){
}
}
break;
}
break;
}
}
function getiFrameSrc(){
var _217=new StringBuffer();
var _218=tabs[schmapplet.tabOrder].tabRealView;
var _219=document.location.href;
if(schmapplet.oldUid){
_219=_219.replace(schmapplet.oldUid,schmapplet.uid);
_219=_219.replace(schmapplet.oldSid,schmapplet.sid);
}
_219=_219.replace(schmapplet.pageTemplate,template.ident);
_219=_219.split("&mapapi=");
_219=_219[0];
try{
if(parent.mapboxid){
_219=_219.replace("t020d","t020");
}
}
catch(e){
}
var _21a="";
if(schmapplet.mapapi){
var _21b=schmapplet.pageTid+".html";
var _21c=schmapplet.mapapi.substr(0,1).toLowerCase();
var _21d=_21c+".html";
_219=_219.replace(_21b,_21d);
}
_219=_219.replace("&multimaps=true","");
var _21e=_219.match(/(.*)#mapview=[^&#]+([&#].*)/i);
var url_=new StringBuffer();
var s=Map_object.schmapplet_s.split(" ");
try{
if(fixedPlace!=null&&fixedPlace!=""){
url_.append("&placeid=");
url_.append(fixedPlace);
}
}
catch(e){
}
url_.append("&topleft=").append(s[0]);
url_.append(",").append(s[1]).append("&bottomright=");
url_.append(s[2]).append(",").append(s[3]);
if(schmapplet.uplaceonly){
url_.append("&uplaceonly=").append(schmapplet.uplaceonly);
}
if(schmapplet.subtitle){
url_.append("&subtitle=").append(schmapplet.subtitle);
}
_217.append(_21e[1]);
_217=getSiInUrl(_217);
_217.append("#mapview=").append(schmapplet.mapview);
_217.append("&tab=").append(_218).append(url_.toString());
if(autoplayUrl!=null){
_217.append("&autoplay=").append(schmapplet.autoplay);
}
schmapplet.tabLink=_218;
if(schmapplet.uplace){
_217.append("&uplace=").append(schmapplet.uplace.id).append("|").append(schmapplet.uplace.geo[0]).append(",").append(schmapplet.uplace.geo[1]).append("|").append(schmapplet.uplace.name).append("|").append(schmapplet.uplace.sdesc);
}
if(schmapplet.applyColors){
_217.append("&applycolors=").append(schmapplet.applyColors);
}
if(showMenusFromUrl!=null){
_217.append("&showMenus=").append(showMenusFromUrl);
}
_217.append("&c=").append(colorset);
return _217.toString();
}
function getFullSchmapURL(){
var _221=new StringBuffer();
var _222=tabs[schmapplet.tabOrder].tabRealView;
_221.append("http://").append(window.location.host).append("/").append(schmapplet.uid).append("/").append(schmapplet.sid).append("/");
var url_=new StringBuffer();
var s=Map_object.schmapplet_s.split(" ");
if(initPlaceId!==undefined&&initPlaceId.length>0){
url_.append("&p=").append(initPlaceId);
}
url_.append("&topleft=").append(s[0]);
url_.append(",").append(s[1]).append("&bottomright=");
url_.append(s[2]).append(",").append(s[3]);
url_.append("&i=none");
_221.append("#r=none&mapview=").append(schmapplet.mapview);
_221.append("&tab=").append(_222).append(url_.toString());
return _221.toString();
}
function getSectionSrcXml(uid,_226){
return concat(["/common/minismplmenu.html?/",uid,"/",_226,"&Nav"]);
}
function setupWidget(){
logTime("Initialization completed (before framework creation)");
try{
if(parent){
if(typeof (parent.placesChecked)!="undefined"){
placesChecked=parent.placesChecked;
}
}
}
catch(e){
}
if(settings["CenteredLayout"]=="true"){
addElementClass("place-info","alignCenter");
}else{
removeElementClass("place-info","alignCenter");
}
$("canvas").style.visibility="visible";
var _227=window.location.pathname;
var _228=_227.substring(_227.lastIndexOf("/")+1).replace(".html","");
schmapplet.pageTemplate=_228.substr(0,4);
var _229=_228.substr(_228.length-1);
schmapplet.pageTid=_229;
if(!initialized){
var _22a=getHashParams();
schmapplet.colorset=null;
colorset=_22a.c||"";
if(colorset.length<1||colorset.toLowerCase()=="none"){
colorset="f6f6f6A72122A62122A62122FFF88FFAF5BBffffffFFF88Fd8d8d8A4A7A6A621226990ffECEBBD0000005C5A4E5C5A4E000000929292F0EFDA";
}
changingColor(colorset);
}
if(settings["SuppressAutopan"]=="true"){
schmapplet.noAutoPan=true;
}
if(typeof (xparams)!="undefined"){
if(typeof (xparams.zoomLinkOverride)!="undefined"&&xparams.zoomLinkOverride!=""){
var _22b=xparams.zoomLinkOverride.split("|");
if(_22b.length==2){
zoomlinkUrl=_22b[1];
_22b=_22b[0];
settings["ZoomText"]=_22b;
settings["ZoomOutText"]=_22b;
schmapplet.zoomLinkOver=zoomlinkUrl;
}
}
if(typeof (xparams.MapLink)!="undefined"&&xparams.MapLink!=""){
settings.MapLink=xparams.MapLink;
}
if(typeof (xparams.MapLink)!="undefined"&&xparams.SubTitleLink!=""){
settings.SubTitleLink=xparams.SubTitleLink;
}
if(typeof (xparams.GameVenueLink)!="undefined"&&xparams.GameVenueLink!=""){
settings.GameVenueLink=xparams.GameVenueLink;
}
if(typeof (xparams.TitleLink)!="undefined"&&xparams.TitleLink!=""){
settings.TitleLink=xparams.TitleLink;
}
}
isPhotoView=false;
schmapplet.selectedPhoto=0;
var obt=$("optionalBottomText");
if(obt){
$("canvas").style.bottom=obt.getAttribute("height")+"px";
}
if(_228.substr(0,1)=="s"){
schmapplet.usingSTemplate=1;
var _22d=$("canvas").clientWidth+2;
}
schmapplet.advertH=0;
if($("optionalBottomText")){
schmapplet.advertH=$("optionalBottomText").getAttribute("height");
}
schmapplet.tabLinkOrder=0;
photoTabSN=-1;
if(window.top===window){
setElementDimensions("canvas",{w:198,h:378});
}
if(typeof (schmapplet.ultranarrow)!="undefined"&&schmapplet.ultranarrow.toLowerCase()=="true"){
$("details").style.left="1px";
$("place-name-top").style.left="1px";
$("subtitle-ie").style.left="1px";
$("subtitle-div").style.left="2px";
$("view-panel").style.left="2px";
$("place-info").style.left="2px";
$("whatsthis").style.left="1px";
$("map").style.left="2px";
$("map2").style.left="2px";
$("photos").style.left="1px";
$("GetSchmappletText").style.left="1px";
$("guide-hotswap-div").style.left="1px";
$("section-hotswap-div").style.left="1px";
$("copyright-hotswap-div").style.left="1px";
$("schedule").style.left="2px";
$("stats").style.left="2px";
$("stats").style.right="2px";
$("details").style.right="1px";
$("place-name-top").style.right="1px";
$("subtitle-div").style.right="1px";
$("view-panel").style.right="2px";
$("place-info").style.right="2px";
$("map").style.right="2px";
$("map2").style.right="2px";
$("photos").style.right="1px";
$("GetSchmappletText").style.right="1px";
$("schedule").style.right="2px";
}
getPlaceInfoStyle("TitleInPlaceStrip");
getPlaceInfoStyle("ShortDescInPlaceStrip");
getPlaceInfoStyle("AddrLine1InPlaceStrip");
getPlaceInfoStyle("PhoneNoInPlaceStrip");
getPlaceInfoStyle("urlInPlaceStrip");
if(typeof (settings.isGuideSchmapplet)!="undefined"&&settings.isGuideSchmapplet.match(/^true$/i)){
$("subtitle-div").style.visibility="visible";
$("subtitle-ie").style.visibility="visible";
var _22e=38;
setStyle("map",{"top":_22e+"px"});
setStyle("map2",{"top":_22e+"px"});
setStyle("schedule",{"top":_22e+"px"});
setStyle("stats",{"top":_22e+"px"});
setStyle("place-name-top",{"top":_22e+"px"});
_22e=_22e+23;
setStyle("details",{"top":_22e+"px"});
setStyle("photos",{"top":_22e-23+"px"});
var _22f=document.body.clientHeight-129-_22e;
_22f=document.body.clientHeight-124-_22e;
if(!initialized){
disconnect("print-p","onclick",printPlace);
if(isIE6){
connect("zoom-p","onmouseover",showUnderline);
connect("zoom-p","onmouseout",hideUnderline);
}
}
$("title-button-span").innerHTML="";
$("subtitle-button-span").innerHTML="";
isGuideSchmapplet=true;
}else{
if(typeof (settings.Logo)!="undefined"&&settings.Logo.length>0){
var _230=PNG({width:122,height:22,"src":settings.Logo});
$("title-link").removeChild($("title-link").lastChild);
$("title-link").appendChild(_230);
hideElement("title");
$("title-link").style.padding="0px";
if(typeof (settings.DisableTitleLinks)=="undefined"||settings.DisableTitleLinks=="false"||settings["TitleLink"]=="true"){
disconnect(_230,"onclick",mainTitlGo);
connect(_230,"onclick",mainTitlGo);
}else{
disconnect($("title-link").lastChild,"onmouseover",hideUnderline);
connect($("title-link").lastChild,"onmouseover",hideUnderline);
}
$("subtitle-div").style.visibility="visible";
$("subtitle-ie").style.visibility="visible";
var _22e=38;
setStyle("map",{"top":_22e+"px"});
setStyle("map2",{"top":_22e+"px"});
setStyle("schedule",{"top":_22e+"px"});
setStyle("stats",{"top":_22e+"px"});
setStyle("place-name-top",{"top":_22e+"px"});
_22e=_22e+$("place-name-top").clientHeight;
setStyle("details",{"top":_22e+"px"});
setStyle("photos",{"top":_22e-22+"px"});
var _22f=document.body.clientHeight-129-_22e;
_22f=document.body.clientHeight-124-_22e;
isGuideSchmapplet=true;
}else{
isGuideSchmapplet=false;
}
}
if(typeof (settings.OnePlaceOnly)!="undefined"&&settings.OnePlaceOnly.match(/^true$/i)){
hideElement("play-button");
hideElement("stop-button");
hideElement("pause-button");
hideElement("prev-button");
hideElement("next-button");
hideElement("counter");
}else{
if((typeof (settings.ShowAllPlayButtons)!="undefined"&&settings.ShowAllPlayButtons.match(/^false$/i))){
hideElement("play-button");
hideElement("stop-button");
hideElement("pause-button");
}else{
if(typeof (settings.ShowAllPlayButtons)!="undefined"&&settings.ShowAllPlayButtons.match(/^true$/i)){
settings["playf"]=PNG({src:settings.PlayFlash,width:16,height:13});
settings["playb"]=PNG({src:settings.Play,width:16,height:13});
$("play-button").innerHTML="";
$("pause-button").innerHTML="";
$("stop-button").innerHTML="";
$("next-button").innerHTML="";
appendChildNodes("play-button",settings.playb,settings.playf);
hideElement(settings.playf);
appendChildNodes("pause-button",PNG({id:"stopbutton",src:settings.Stop,width:13,height:13}));
appendChildNodes("stop-button",PNG({src:settings.Pause,width:13,height:13}));
appendChildNodes("prev-button",PNG({src:settings.Back,width:13,height:13}));
appendChildNodes("next-button",PNG({src:settings.Forward,width:13,height:13}));
if(!initialized){
disconnect("prev-button","onclick",prevPlace);
analyticsConnect("prev-button","onclick",prevPlace,analyticsHooks.back);
disconnect("next-button","onclick",nextPlace);
analyticsConnect("next-button","onclick",nextPlace,analyticsHooks.forward);
disconnect("play-button","onclick",startPlay);
connect("play-button","onclick",startPlay);
disconnect("pause-button","onclick",stopPlay);
connect("pause-button","onclick",stopPlay);
disconnect("stop-button","onclick",pausePlay);
connect("stop-button","onclick",pausePlayClick);
}
}
}
}
if(templateChanged&&schmapplet.copyrightPanel&&schmapplet.copyrightPanel.length>20){
$("copyright-hotswap-div").innerHTML=schmapplet.copyrightPanel;
}
if(isIE6){
unbreakIE();
unbreakIERun=1;
disconnect(window,"onresize",unbreakIE);
connect(window,"onresize",unbreakIE);
}else{
disconnect(window,"onresize",repositionPlaceStrip);
connect(window,"onresize",repositionPlaceStrip);
}
if(typeof (settings.Footer)!="undefined"&&settings.Footer.match(/^t:/)){
var _231=$("logo-url");
_231.innerHTML=settings.Footer.replace(/^t:/,"");
}else{
if(typeof (settings.Footer)!="undefined"&&settings.Footer.match(/^i:/)){
settings.LogoBottom=settings.Footer.replace(/^i:/,"");
}
$("whatsthis").innerHTML="";
if(!isIE6){
settings["logo"]=IMG({id:"logo",src:settings.LogoBottom});
appendChildNodes($("whatsthis"),settings.logo);
$("logo").height=12;
}else{
settings["logot"]=PNG({id:"logo",src:settings.LogoBottom,width:67,height:12});
$("whatsthis").innerHTML="";
appendChildNodes($("whatsthis"),settings.logot);
}
}
map(function(el){
connect(el,"onmouseover",autoPauseEx);
},["map","map2","view-panel","details","photos","place-info","schedule","stats"]);
map(function(el){
connect(el,"onmouseout",autoPlayEx);
},["map","map2","view-panel","details","photos","place-info","schedule","stats"]);
if(settings.Play.toLowerCase()=="null"){
hideElement("play-button");
}
if(settings.Pause.toLowerCase()=="null"){
hideElement("stop-button");
}
if(settings.Stop.toLowerCase()=="null"){
hideElement("pause-button");
}
if((typeof (schmapplet.usingSTemplate)!="undefined")&&schmapplet.usingSTemplate==1){
if(zoomLevel>0){
$("zoom-p").innerHTML=settings.ZoomText;
$("zoom-p").style.visibility="hidden";
if(schmapplet.usingSTemplate==1){
$("zoom-p").style.fontSize="10px";
}
$("zoom-p").style.fontSize="9px";
var _234="-28px";
removeElementClass("zoom-p","zoom-p");
addElementClass("zoom-p","zoom-p-sports");
var _234="16px";
var _235=false;
if(settings["ZoomToStadiumOffset"]){
if(settings["ZoomToStadiumOffset"]=="relative"){
_235=true;
}else{
_234=Number(settings["ZoomToStadiumOffset"]);
_234=_234.toString()+"px";
}
}
var _22d=$("place-info").clientWidth+"px";
if(_235){
setStyle("zoom-p",{"position":"absolute","margin-top":"5px","visibility":"hidden",width:_22d});
}else{
setStyle("zoom-p",{"position":"absolute","bottom":_234,left:"4px","visibility":"hidden",width:_22d});
}
if(settings.CenterZoomLink!="undefined"&&settings.CenterZoomLink=="true"){
addElementClass("zoom-p","alignCenter");
}
disconnect("zoom-p","onclick",zoomInOut);
analyticsConnect("zoom-p","onclick",zoomInOut,analyticsHooks.textZoom);
}
disconnect("print-p","onclick",printPlace);
setStyle("print-p",{"cursor":"default"});
setStyle("directions-p",{"cursor":"default"});
}else{
if(settings.UseFunctionIcons!=="undefined"&&settings.UseFunctionIcons.match(/^true$/i)){
settings["printb"]=PNG({id:"print-button",title:"Print",src:settings.Print,width:13,height:12});
setStyle("print-p",{"left":"0px"});
$("print-p").innerHTML="";
appendChildNodes("print-p",settings.printb);
settings["directionsb"]=PNG({id:"directions-button",title:"Get directions",src:settings.Directions,width:13,height:12});
settings["zoomout"]=PNG({id:"zoom-out-button",title:"Zoom out",src:settings.ZoomOut,width:13,height:12});
settings["zoomin"]=PNG({id:"zoom-in-button",title:"Zoom in",src:settings.ZoomIn,width:13,height:12});
if(typeof (settings.HasDriverDirection)!="undefined"&&settings.HasDriverDirection=="no"){
hideElement("directions-p");
setStyle("zoom-p",{"left":16+"px"});
}else{
$("directions-p").innerHTML="";
appendChildNodes("directions-p",settings.directionsb);
setStyle("directions-p",{"left":16+3+"px"});
setStyle("zoom-p",{"left":16+16+6+"px"});
disconnect("directions-p","onclick",showDriveDirections);
connect("directions-p","onclick",showDriveDirections);
}
if(zoomLevel>0){
$("zoom-p").innerHTML="";
appendChildNodes("zoom-p",settings.zoomout,settings.zoomin);
hideElement(settings.zoomout);
}
}else{
$("print-p").innerHTML="print";
setStyle("print-p",{"left":"0px"});
if(zoomLevel>0){
$("zoom-p").innerHTML="zoom in";
}
if(typeof (settings.HasDriverDirection)!="undefined"&&settings.HasDriverDirection=="no"){
hideElement("directions-p");
setStyle("zoom-p",{"left":16+"px"});
}else{
setStyle("directions-p",{"left":16+6+"px"});
$("directions-p").innerHTML="Get directions";
setStyle("zoom-p",{"left":16+16+12+"px"});
disconnect("directions-p","onclick",showDriveDirections);
connect("directions-p","onclick",showDriveDirections);
}
}
connect("print-p","onclick",printPlace);
if(zoomLevel>0){
analyticsConnect("zoom-p","onclick",zoomInOut,analyticsHooks.textZoom);
}else{
hideElement("zoom-p");
}
}
if(typeof (settings.FooterType)!="undefined"&&settings.FooterType.match(/panel/i)){
disconnect("whatsthis","onmouseover",showSchmappletTextPanel);
disconnect("whatsthis","onmouseout",hideSchmappletTextPanel);
disconnect("GetSchmappletText","onmouseout",hideSchmappletTextPanel);
disconnect("code","onclick",clickselect);
analyticsConnect("whatsthis","onmouseover",showSchmappletTextPanel,analyticsHooks.getThisWidget);
connect("whatsthis","onmouseout",hideSchmappletTextPanel);
connect("GetSchmappletText","onmouseout",hideSchmappletTextPanel);
connect("canvas","onmouseout",hideSchmappletTextPanel);
analyticsConnect("code","onclick",clickselect,analyticsHooks.copyCodeLeft);
}
updateParentIframeCode();
if(typeof (schmapplet.placeid)=="undefined"){
schmapplet.placeid=PlaceId;
initPlaceId=schmapplet.placeid;
}
if(typeof (schmapplet.autoplay)=="undefined"){
schmapplet.autoplay=settings.Autoplay;
schmapplet.autoplay=Boolean(Number(schmapplet.autoplay));
}
if(typeof (schmapplet.delayTime)=="undefined"){
schmapplet.delayTime=settings.Delay;
}
schmapplet.cycleTime=(schmapplet.delayTime/flashTime)/1000;
loadPlacesInfo();
var _236=getElementsByTagAndClassName("a","MyText");
var _237=_236.length;
if(_237==1){
analyticsConnect(_236[0],"onclick",function(){
},analyticsHooks.belowTextClick);
analyticsConnect(_236[0],"onmouseover",function(){
},analyticsHooks.belowTextOver);
}
}
function clickselect(){
this.select();
}
function loadPlacesInfo(){
window.debugrunner=settings;
if(!settings.PlacesXmlName){
settings.PlacesXmlName="places.xml";
}
if(!schmapplet.isiGoogle){
if(schmapplet.lang&&schmapplet.lang!==""){
if(schmapplet.lang!=="en"){
settings.PlacesXmlName=settings.PlacesXmlName.replace(".xml","")+"_"+schmapplet.lang+".xml";
}
}else{
settings.PlacesXmlName+=config.get("negotiateSuffix");
}
}
var _238=settings.SchmappletHome.replace("%uid%",schmapplet.uid);
_238=_238.replace("%sid%",schmapplet.sid);
var url=_238+"/"+settings.PlacesXmlName;
xmlLoad(url,handlePlaces);
}
function handlePlaces(req){
logTime("Framework created ... starting loading places");
var xml=req.responseXML;
schmapplet.placesInfo=new XmlDoc(xml);
loadPlaces();
}
function getExceptionInfo(xml){
var _23d=new XMLAccess();
_23d.setXmlDoc(xml);
var root,_23f,_240,_241,_242,_243;
root=_23d.getFirstChild(xml,"/schmap:SchmappletParams");
_23f=_23d.getSingleChildText(root,"schmap:MapIconsDir");
if(typeof (_23f)!="undefined"&&_23f!=""){
mapiconspath=_23f;
}
_240=_23d.getChildren(root,"schmap:IconFile");
forEach(_240,function(node){
var code=_23d.getSingleChildText(node,"schmap:code");
var url=_23d.getSingleChildText(node,"schmap:url");
if(url!="null"&&url.length>0){
settings[code]=url;
}
});
_242=_23d.getSingleChildText(root,"schmap:ShowAllPlayButtons");
_243=_23d.getSingleChildText(root,"schmap:isGuideSchmapplet");
if(typeof (_242)!="undefined"&&_242.length>0){
settings.ShowAllPlayButtons=_242;
}
if(typeof (_243)!="undefined"&&_243.length>0){
settings.isGuideSchmapplet=_243;
}
_241=_23d.getFirstChild(root,"schmap:PageParams");
if(_241){
var _247=_23d.getSons(_241,"./*");
forEach(_247,function(node){
var name=node.nodeName;
name=name.split(":")[1];
if(name=="dlparameter"){
var _24a=_23d.getText(node);
var _24b=_24a.match(/topleft=(.[^&#]+)[&]{0,}/i);
if(_24b){
topleft=_24b[1];
}
_24b=_24a.match(/bottomright=(.[^&#]+)[&]{0,}/i);
if(_24b){
bottomright=_24b[1];
}
}else{
if(name=="PlacesXmlName"){
}else{
var _24a=_23d.getText(node);
settings[name]=_24a;
}
}
});
}
setupWidget();
}
function getInfoFromMetaParams(){
var _24c={};
var _24d=document.getElementsByTagName("meta");
var _24e=_24d.length;
for(var i=0;i<_24e;i++){
var node=_24d[i];
if(node.name){
schmapplet[node.name]=node.content;
}
_24c[node.name]=node.content;
}
return _24c;
}
function getParamsFromXml(){
var ti=template.ident;
if(!schmapplet.isiGoogle&&schmapplet.lang){
var lang="&lang="+schmapplet.lang;
}else{
var lang="";
}
var url="/templates/params/including.html?doc=xml&tpl="+ti+".html"+lang;
logDebug(url);
var xml=xmlSyncLoad(url);
var _255=xml.childNodes;
var _256={};
forEach(_255,function(node){
if(node.nodeName!="meta"){
return;
}
var name=node.getAttribute("name");
if(!name){
return;
}
if(name=="getWidgetPanel"){
schmapplet.getWidgetPanel=xmlAccess.getText(node);
}
if(name=="copyrightPanel"){
schmapplet.copyrightPanel=xmlAccess.getText(node);
}
var _259=node.getAttribute("content");
_256[name]=_259;
});
return _256;
}
function changeTemplate(_25a){
logDebug("change template");
if(_25a==template.ident){
return;
}
templateChanged=1;
template.ident=_25a;
logDebug("new template identifier:"+_25a);
exception();
}
function isNotUndefOrNull(_25b){
if(typeof (_25b)!="undefined"&&_25b!=null&&_25b!=""){
return true;
}
return false;
}
function ifRemoveFutherGames(){
if(typeof (settings.RemoveFutureSchedule)!="undefined"){
var _25c=settings.RemoveFutureSchedule;
var uids=_25c.split(",");
var len=uids.length;
for(var i=0;i<len;i++){
if(typeof (schmapplet.uid)!="undefined"&&schmapplet.uid==uids[i]){
return true;
}
}
return false;
}
return false;
}
function exception(){
settings={};
if(templateChanged){
update(settings,getParamsFromXml());
}else{
update(settings,getInfoFromMetaParams());
}
nodes=document.getElementsByTagName("link");
var _260=nodes.length;
for(var i=0;i<_260;i++){
var node=nodes[i];
if(node.rel){
schmapplet[node.rel]=node;
}
if(node.rel=="FooterLink"){
settings[node.rel]=node.href;
}
}
if(trackPage){
if(typeof (settings.TrackPage)!="undefined"&&settings.TrackPage.length>0){
trackPage=settings.TrackPage;
}else{
trackPage=false;
}
}
mapiconspath=settings.MapIconsDir;
pageiconpath=settings.IconsDir;
logDebug("mapiconspath   ",mapiconspath);
var _263=["Play","PlayFlash","Pause","Stop","Back","Forward","LogoBottom","CC","DefaultPlace","ZoomOut","ZoomIn","Print","Directions"];
var _264=["play.png","play-flash.png","pause.png","stop.png","prev.png","next.png","logo.png","cc.png","defaultplace.png","zoom-out.png","zoom-in.png","print.png","car.png"];
var _265=_263.length;
for(ii=0;ii<_265;ii++){
var name=_263[ii];
var _267=_264[ii];
var pcn=name;
var pcv=_267;
settings[pcn]=pageiconpath+pcv;
}
if(showMenusFromUrl==null){
if(typeof (settings.ShowMenus)!="undefined"){
showMenusFromMeta=settings.ShowMenus;
for(var i=0;i<showMenusFromMeta.length;i++){
showTwoMenus[i]=showMenusFromMeta.charAt(i);
}
}else{
showTwoMenus=[1,1];
}
}
if(typeof (xparams)!="undefined"&&typeof (xparams.zoomLevel)!="undefined"&&xparams.zoomLevel!=""){
zoomLevel=xparams.zoomLevel;
}else{
zoomLevel=Math.round(settings.ZoomLevel);
}
if(typeof (schmapplet.usingSTemplate)!="undefined"&&!schmapplet.usingSTemplate){
var _26a;
var _26b=settings.SchmappletHome.replace("%uid%",schmapplet.uid);
_26b=_26b.replace("%sid%",schmapplet.sid);
_26b+="/"+schmapplet.TemplateCode+"exceptions.xml";
try{
_26a=new XMLHttpRequest();
}
catch(e){
try{
_26a=new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
catch(e){
try{
_26a=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
logDebug("Your browser does not support AJAX!");
}
}
}
_26a.open("GET",_26b+"?rnd="+Math.random(),false);
_26a.send(null);
if(_26a.status==200){
getExceptionInfo(_26a.responseXML);
}else{
tabs=[];
setupWidget();
}
}else{
tabs=[];
setupWidget();
}
}
function beforSetup(){
if(typeof (needGoogle)!=="undefined"){
schmapplet.needGoogle=needGoogle;
}
if(!schmapplet.mapIcons){
schmapplet.mapIcons={};
schmapplet._loading=true;
schmapplet.selected=0;
schmapplet.view="map";
schmapplet.IEquirks=(b_version.search(/MSIE/i)!=-1);
schmapplet.cycleTime=6;
schmapplet.placesById={};
schmapplet._placesCount=0;
}
if(beforSetupCalled){
return;
}else{
beforSetupCalled=true;
}
schmapplet.placeidUrl="";
var _26c=getSearchParams();
if((_26c.parent&&_26c.parent.match(/google/i))||_26c[".lang"]){
schmapplet.isiGoogle=true;
}else{
schmapplet.isiGoogle=false;
}
schmapplet.sid=_26c.sid;
schmapplet.uid=_26c.uid;
schmapplet.oldUid=schmapplet.uid;
schmapplet.oldSid=schmapplet.sid;
schmapplet.ultranarrow=_26c.ultranarrow;
schmapplet.si=_26c.si;
schmapplet.lang=_26c.lang;
if(!schmapplet.si){
schmapplet.si=_26c.sit;
}
var _26d=getHashParams();
schmapplet.mapview=_26d.mapview;
schmapplet.applyColors=_26d.applycolors;
if(typeof (schmapplet.mapview)=="undefined"||schmapplet.mapview.length<=0){
schmapplet.mapview="Map";
}
schmapplet.tabLink=_26d.tab;
if(typeof (_26d.subtitle)!="undefined"){
schmapplet.subtitle=_26d.subtitle;
}
if(_26d.topleft!=""){
schmapplet.topleft=_26d.topleft;
schmapplet.bottomright=_26d.bottomright;
}else{
schmapplet.topleft=null;
schmapplet.bottomright=null;
}
if(_26d.placeid){
schmapplet.placeid=_26d.placeid;
fixedPlace=_26d.placeid;
}
schmapplet.placeid=_26d.placeid;
initPlaceId=schmapplet.placeid;
schmapplet.autoplay=_26d.autoplay;
if(typeof (_26d.autoplay)!="undefined"){
schmapplet.autoplay=Boolean(_26d.autoplay);
autoplayUrl=schmapplet.autoplay;
}
schmapplet.delayTime=_26d.delay;
if(typeof (_26d.showMenus)!="undefined"){
showMenusFromUrl=_26d.showMenus;
for(var i=0;i<showMenusFromUrl.length;i++){
showTwoMenus[i]=showMenusFromUrl.charAt(i);
}
}
if(_26d.uplace){
if(_26d.uplaceonly){
schmapplet.uplaceonly=_26d.uplaceonly;
isPlaceOnly=true;
}
schmapplet.uplace=createUserPlace(_26d.uplace);
schmapplet.places=[];
schmapplet.places[0]=schmapplet.uplace;
}
schmapplet.isPolled=_26d.isPolled;
var url=document.location.href;
var m=url.match(/http:\/\/(.+?)\//i);
schmapplet.url_prefix=m[0];
overwriteXparams();
if(typeof (xparams)!="undefined"&&typeof (xparams.permanentLogo)!="undefined"){
schmapplet.permanentLogo=xparams.permanentLogo;
if(typeof (schmapplet.mapLogo)!="undefined"&&schmapplet.mapLogo!=null){
var _271={};
_271.mapLogo=schmapplet.mapLogo;
_271.logoLink=schmapplet.logoLink;
mapLogo.push(_271);
}
var _272={};
if(xparams.mapLogo!=""){
_272.mapLogo=xparams.mapLogo;
_272.logoLink=xparams.logoLink;
mapLogo.push(_272);
}
}else{
schmapplet.permanentLogo=false;
}
if(typeof (schmapdata_ov)!=="undefined"){
schmapdata=schmapdata_ov;
}
try{
if(typeof (schmapplet.isPolled)!="undefined"&&schmapplet.isPolled==1){
var _273=setInterval("checkArgs()",10);
}
}
catch(e){
}
exception();
}
function showUnderline(){
setStyle(this,{"text-decoration":"underline","cursor":"pointer"});
}
function hideUnderline(){
setStyle(this,{"text-decoration":"none","cursor":"default"});
}
connect(window,"onload",beforSetup);
connect(window,"onunload",uninstall);
function cancelDelay(evt){
if(mouseIntoInfoPanelFromTop(evt,this)){
return;
}
if(schmapplet.delay){
schmapplet.delay.cancel();
schmapplet.delay=null;
}
}
function mouseIntoInfoPanelFromTop(evt,obj){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var pos=getElementPosition(obj);
var dim=getElementDimensions(obj);
if(schmapplet.IEquirks){
pos.y+=2;
pos.x+=2;
}
if(isSafari){
my+=14;
}
if(mx==0||my==0){
return true;
}
if(pos.x<mx&&(pos.x+dim.w)>mx&&pos.y<my&&(pos.y+dim.h)>my){
return true;
}
return false;
}
function truncated(str,num,lat){
if(typeof (str)!="string"){
return "";
}
if(!str){
return "";
}
if(!lat){
lat="...";
}
var _27e=str.substring(0,num);
if(str.length>num){
_27e+=lat;
}
return _27e;
}
function truncatWidth(str,num,lat){
str=str.toString();
if(!str){
return "";
}
if(!lat){
lat="...";
}
var sp=SPAN({"class":"aaa"});
setStyle(sp,{"visibility":"hidden","position":"absolute","z-index":"-50"});
appendChildNodes(document.body,sp);
var _283=str.length;
for(i=i;i<_283;i++){
var _284=str.substring(0,i);
sp.innerHTML=_284;
if(sp.offsetWidth>=num){
break;
}
}
_284=truncated(str,i--);
return _284;
}
function centerMaps(){
schmapplet.map.zoomToBounds(schmapplet.bounds);
updateParentIframeCode();
}
function keepCenter(_285){
if(!schmapplet.map){
return;
}
schmapplet.mapResized=true;
if(schmapplet.selected!==undefined&&schmapplet.places[schmapplet.selected]){
if(schmapplet.places[schmapplet.selected].zoomedIn){
var _286=schmapplet.places[schmapplet.selected];
zoomLevel=Math.abs(zoomLevel);
schmapplet.map.setDisplay(_286.geocode,settings.ZoomLevel);
return;
}
}
centerMaps();
}
function dragStart(){
if(BrowserDetect.browser=="Explorer"){
document.attachEvent("onmousemove",parent.dragTo);
}else{
document.addEventListener("mousemove",parent.dragTo,true);
}
}
function adjustMapHeigtforIE(){
if(isIE6){
h=getElementDimensions("canvas").h-160+12;
if(isGuideSchmapplet){
h-=14;
}
$("map").style.height=h+"px";
$("map2").style.height=h+"px";
}
}
function unbreakIE(){
try{
var _287=document.body.clientWidth;
var _288=document.body.clientHeight;
var _289=$("subtitle-div").clientHeight;
var obt=$("optionalBottomText");
if(obt){
_288-=Number(obt.getAttribute("height"));
}
setStyle("canvas",{"width":(_287-2)+"px","height":(_288-2)+"px"});
setStyle("codetext",{"width":(_287-16)+"px"});
setStyle("detail-url",{"width":(_287-36)+"px"});
setStyle("photo-table",{"height":"100%"});
setStyle("photo-button",{"width":(_287-22)+"px"});
if(isGuideSchmapplet){
if(typeof (schmapplet.ultranarrow)!="undefined"&&schmapplet.ultranarrow.toLowerCase()=="true"){
setStyle("details",{"width":(_287-16)+"px","height":(_288-178-_289)+"px"});
setStyle("place-name-top",{"width":(_287-16)+"px"});
setStyle("view-panel",{"width":(_287-12)+"px"});
setStyle("place-info",{"width":(_287-10)+"px"});
setStyle("map",{"width":(_287-6)+"px","height":(_288-162)+"px"});
setStyle("map2",{"width":(_287-6)+"px","height":(_288-160)+"px"});
setStyle("photos",{"width":(_287-6)+"px","height":(_288-160)+"px"});
setStyle("subtitle-div",{"width":(_287-6)+"px"});
map(function(el){
setStyle(el,{"width":_287-6+"px"});
},["guide-hotswap-frame","section-hotswap-frame","article-frame"]);
setStyle("subtitle-ie",{"width":(_287-6)+"px"});
setStyle("schedule",{"width":(_287-6)+"px","height":(_288-160+85)+"px"});
setStyle("stats",{"width":(_287-6)+"px","height":(_288-160+85)+"px"});
setStyle("GetSchmappletText",{"width":(_287-16)+"px","height":(_288-51)+"px"});
setStyle("guide-hotswap-div",{"width":(_287-16)+"px","height":(_288-66)+"px"});
setStyle("section-hotswap-div",{"width":(_287-16)+"px","height":(_288-66)+"px"});
setStyle("copyright-hotswap-div",{"width":(_287-14)+"px","height":(_288-53)+"px"});
$("copyright-hotswap-div").style.left="2px";
}else{
setStyle("details",{"width":(_287-22)+"px","height":(_288-170)+"px"});
setStyle("place-name-top",{"width":(_287-22)+"px"});
setStyle("view-panel",{"width":(_287-11)+"px"});
addElementClass("view-panel","view-panel-class");
setStyle("place-info",{"width":(_287-16)+"px"});
setStyle("map",{"width":(_287-12)+"px","height":(_288-146)+"px"});
setStyle("map2",{"width":(_287-12)+"px","height":(_288-146)+"px"});
setStyle("photos",{"width":(_287-12)+"px","height":(_288-160-_289+14)+"px"});
setStyle("subtitle-div",{"width":(_287-12)+"px"});
map(function(el){
setStyle(el,{"width":_287-12+"px"});
},["guide-hotswap-frame","section-hotswap-frame","article-frame"]);
setStyle("subtitle-ie",{"width":(_287-12)+"px"});
setStyle("schedule",{"width":(_287-14)+"px","height":(_288-143-_289+85)+"px"});
setStyle("stats",{"width":(_287-12)+"px","height":(_288-143-_289+85)+"px"});
setStyle("GetSchmappletText",{"width":(_287-22)+"px","height":(_288-65)+"px"});
setStyle("guide-hotswap-div",{"width":(_287-22)+"px","height":(_288-66)+"px"});
setStyle("section-hotswap-div",{"width":(_287-22)+"px","height":(_288-66)+"px"});
setStyle("copyright-hotswap-div",{"width":(_287-22)+"px","height":(_288-66)+"px"});
}
}else{
if(typeof (schmapplet.ultranarrow)!="undefined"&&schmapplet.ultranarrow.toLowerCase()=="true"){
setStyle("details",{"width":(_287-16)+"px","height":(_288-170)+"px"});
setStyle("place-name-top",{"width":(_287-16)+"px"});
setStyle("view-panel",{"width":(_287-12)+"px"});
addElementClass("view-panel","view-panel-class");
setStyle("place-info",{"width":(_287-10)+"px"});
setStyle("map",{"width":(_287-6)+"px","height":(_288-143+2)+"px"});
setStyle("map2",{"width":(_287-6)+"px","height":(_288-143)+"px"});
setStyle("photos",{"width":(_287-6)+"px","height":(_288-144)+"px"});
setStyle("schedule",{"width":(_287-6)+"px","height":(_288-143+85)+"px"});
setStyle("stats",{"width":(_287-6)+"px","height":(_288-143+85)+"px"});
setStyle("GetSchmappletText",{"width":(_287-16)+"px","height":(_288-52)+"px"});
setStyle("guide-hotswap-div",{"width":(_287-16)+"px","height":(_288-66)+"px"});
setStyle("section-hotswap-div",{"width":(_287-16)+"px","height":(_288-66)+"px"});
setStyle("subtitle-div",{"width":(_287-6)+"px"});
setStyle("copyright-hotswap-div",{"width":(_287-14)+"px","height":(_288-54)+"px"});
$("copyright-hotswap-div").style.left="2px";
map(function(el){
setStyle(el,{"width":_287-6+"px"});
},["guide-hotswap-frame","section-hotswap-frame","article-frame"]);
}else{
setStyle("details",{"width":(_287-22)+"px","height":(_288-174)+"px"});
setStyle("place-name-top",{"width":(_287-22)+"px"});
setStyle("view-panel",{"width":(_287-11)+"px"});
addElementClass("view-panel","view-panel-class");
setStyle("place-info",{"width":(_287-16)+"px"});
setStyle("map",{"width":(_287-12)+"px","height":(_288-145)+"px"});
setStyle("map2",{"width":(_287-12)+"px","height":(_288-146)+"px"});
setStyle("photos",{"width":(_287-12)+"px","height":(_288-144)+"px"});
setStyle("schedule",{"width":(_287-12)+"px","height":(_288-143+85)+"px"});
setStyle("stats",{"width":(_287-12)+"px","height":(_288-143+85)+"px"});
setStyle("GetSchmappletText",{"width":(_287-22)+"px","height":(_288-65)+"px"});
setStyle("subtitle-div",{"width":(_287-12)+"px"});
setStyle("guide-hotswap-div",{"width":(_287-22)+"px","height":(_288-65)+"px"});
setStyle("section-hotswap-div",{"width":(_287-22)+"px","height":(_288-65)+"px"});
setStyle("copyright-hotswap-div",{"width":(_287-22)+"px","height":(_288-65)+"px"});
map(function(el){
setStyle(el,{"width":_287-12+"px"});
},["guide-hotswap-frame","section-hotswap-frame","article-frame"]);
}
}
repositionPlaceStrip();
if(isStatsView){
jugdescroll($("stats"));
}
}
catch(e){
}
}
function subTitlGo(){
if(settings["SubTitleLink"]=="true"){
var url=new StringBuffer();
url.append("http://").append(window.location.host).append("/").append(schmapplet.uid).append("/").append(schmapplet.sid);
var _290=url.toString();
}else{
var _290=getFullSchmapURL();
}
var _291="";
if(settings["WidgetLinkPopupWidth"]){
_291+="width="+settings["WidgetLinkPopupWidth"];
}
if(settings["WidgetLinkPopupHeight"]){
_291+=", height="+settings["WidgetLinkPopupHeight"];
}
window.open(_290,"",_291);
}
function mainTitlGo(){
var url=new StringBuffer();
url.append("http://").append(window.location.host).append("/").append(schmapplet.uid).append("/").append("home/");
var _293="";
if(settings["WidgetLinkPopupWidth"]){
_293+="width="+settings["WidgetLinkPopupWidth"];
}
if(settings["WidgetLinkPopupHeight"]){
_293+=", height="+settings["WidgetLinkPopupHeight"];
}
window.open(url.toString(),"",_293);
}
function fixed(c,n){
with(Math){
return round(Number(c)*pow(10,n))/pow(10,n);
}
}
function mapsUpdate(evt){
if(isIE7){
var left=getStyle("map","left");
var _298=getStyle("map","right");
var topv=getStyle("map","top");
setStyle("map",{position:"absolute",top:topv,bottom:"120px",left:left,right:_298});
setStyle("map2",{position:"absolute",top:topv,bottom:"120px",left:left,right:_298});
var dim=getElementDimensions("map");
var obt=$("optionalBottomText");
var _29c=0;
if(obt){
_29c=obt.getAttribute("height");
}
try{
if(typeof (parent.placesChecked)=="undefined"){
setElementDimensions("canvas",{h:document.body.clientHeight-2-_29c,w:document.body.clientWidth-2});
}
}
catch(e){
setElementDimensions("canvas",{h:document.body.clientHeight-2-_29c,w:document.body.clientWidth-2});
}
}
var _29d=schmapplet.map.getBounds();
var t=fixed(_29d.north,5);
var l=fixed(_29d.west,5);
var b=fixed(_29d.south,5);
var r=fixed(_29d.east,5);
Map_object.schmapplet_s=concat([t," ",l," ",b," ",r]);
updateParentIframeCode();
}
function changeMapType(_2a2){
schmapplet.map.setMapType(_2a2);
schmapplet.mapview=_2a2;
try{
if(parent){
if(parent.changeIframeCode){
iframeCode=getiFrameSrc();
parent.changeIframeCode(iframeCode);
}
}
}
catch(e){
}
}
function isphotoComplete(_2a3){
if(typeof (_2a3.complete)=="Boolean"){
return _2a3.complete;
}else{
return true;
}
}
function loadNewPlaces(_2a4,_2a5){
schmapplet.photoMade=false;
logDebug(_2a4);
if(_2a5!=template.ident&&_2a5){
templateChanged=1;
template.ident=_2a5;
logDebug("new template identifier:"+_2a5);
}else{
templateChanged=0;
}
if(!loadingEmptyGuide){
if($("section-hotswap-frame")!=null){
$("section-hotswap-frame").style.visibility="hidden";
$("loading-message-guide").style.visibility="visible";
}
$("guide-hotswap-div").style.visibility="visible";
if($("guide-hotswap-frame")!=null){
$("guide-hotswap-frame").style.visibility="hidden";
$("loading-message-guide").style.visibility="visible";
}
}
loadingNewSchmapplet=true;
unbreakIERun=0;
ShowMenus=null;
loadSchmapPlacesFlag=true;
var _2a6=_2a4.split("/");
schmapplet.uid=_2a6[1];
schmapplet.sid=_2a6[2];
sectionLoaded=0;
loadingNewMap=true;
if(templateChanged){
logDebug("loadNewPlaces is called with guide hostswap");
try{
if(parent){
if(parent.window.location.pathname.search("addplace.html")==-1){
showMyPlace=false;
}
}
}
catch(e){
}
if(!loadingEmptyGuide){
schmapplet.topleft=null;
schmapplet.bottomright=null;
}
schmapplet.subtitle="";
Map_object.schmapplet_s=null;
showMenusFromMeta=null;
exception();
loadingEmptyGuide=false;
}else{
logDebug("loadNewPlaces is called without guide hotswap");
loadNewPlace=true;
schmapplet.topleft=null;
schmapplet.bottomright=null;
schmapplet.subtitle="";
Map_object.schmapplet_s=null;
settings.MiniSubTitle="undefined";
if(!schmapplet.isiGoogle&&schmapplet.lang&&schmapplet.lang!==""){
if(schmapplet.lang!=="en"){
_2a4=_2a4.replace(".xml","")+"_"+schmapplet.lang+".xml";
}
}else{
_2a4+=config.get("negotiateSuffix");
}
logDebug("selecte  ",schmapplet.selected,typeof (schmapplet.selected));
if(schmapplet.places[schmapplet.selected].zoomedIn){
if(!(schmapplet.usingSTemplate)){
if(settings.UseFunctionIcons!=="undefined"&&settings.UseFunctionIcons.match(/^true$/i)){
showElement(settings.zoomin);
hideElement(settings.zoomout);
}else{
$("zoom-p").innerHTML=settings.ZoomText;
}
}else{
$("zoom-p").innerHTML=settings.ZoomText;
}
schmapplet.zoomedIn=false;
}
xmlLoad(_2a4,handlePlaces);
}
schmapplet.map2=undefined;
}
function ifAutoPlay(j){
if(j){
startPlay();
}else{
pausePlayClick();
}
updateParentIframeCode();
}
function pausePlayClick(){
schmapplet.pauseClick=true;
pausePlay();
}
function changeIframe(){
if($("guide-hotswap-frame")){
$("guide-hotswap-frame").style.left=0;
$("guide-hotswap-frame").style.right=0;
$("guide-hotswap-frame").style.top=0;
$("guide-hotswap-frame").scrolling="no";
}
if($("section-hotswap-frame")){
$("section-hotswap-frame").style.left=0;
$("section-hotswap-frame").style.right=0;
$("section-hotswap-frame").style.top=0;
}
}
function getAllPhotos(_2a8){
if(typeof (_2a8.photo_objs)!="undefined"&&_2a8.photo_objs.length<=0){
_2a8.photo_objs=_2a8.wcities_photos;
}
}
function loadCountriesInfo(_2a9){
var _2aa=_2a9;
xmlLoad(_2aa,handleCountries);
}
function loadNavInfo(_2ab){
if(navMenu.loaded){
navMenu.loadedXml=_2ab.toString();
}
var _2ac=_2ab;
xmlLoad(_2ac,handleNav);
}
function handleCountries(req){
var xml=req.responseXML;
var _2af=new XmlDoc(xml);
parseCountries(_2af);
}
function handleNav(req){
var xml=req.responseXML;
var _2b2=new XmlDoc(xml);
parseNav(_2b2);
}
function parseCountries(_2b3){
var _2b4=_2b3.xml;
var _2b5=new XMLAccess();
_2b5.setXmlDoc(_2b4);
var _2b6=_2b5.getFirstChild(_2b4,"/schmap:mininavmenu");
countriesMenu.navName=_2b5.getAttributeNode(_2b6,"name");
var _2b7=_2b5.getChildren(_2b6,"schmap:continent");
countriesMenu.bigMenus=map(function(_2b8){
var _2b9={};
_2b9.text=_2b5.getAttributeNode(_2b8,"name");
var _2ba=_2b5.getChildren(_2b8,"schmap:country");
_2b9.midMenus=map(function(_2bb){
var _2bc={};
_2bc.text=_2b5.getAttributeNode(_2bb,"name");
_2bc.link=_2b5.getAttributeNode(_2bb,"url");
var _2bd=_2b5.getAttributeNode(_2bb,"template");
_2bc.template=_2bd;
_2bc.nav=_2b5.getAttributeNode(_2bb,"loadmenu");
var _2be=_2b5.getChildren(_2bb,"schmap:city");
_2bc.smallMenus=map(function(_2bf){
var _2c0={};
_2c0.text=_2b5.getAttributeNode(_2bf,"name");
_2c0.link=_2b5.getAttributeNode(_2bf,"url");
_2c0.geobox=_2b5.getAttributeNode(_2bf,"geobox");
var _2c1=_2b5.getAttributeNode(_2bf,"template");
if(_2c1&&_2c1!==""){
_2c0.template=_2c1;
}else{
_2c0.template=_2bd;
}
_2c0.nav=_2b5.getAttributeNode(_2bf,"loadmenu");
return _2c0;
},_2be);
return _2bc;
},_2ba);
return _2b9;
},_2b7);
}
function parseNav(_2c2){
var _2c3=_2c2.xml;
var _2c4=new XMLAccess();
_2c4.setXmlDoc(_2c3);
var _2c5=_2c4.getFirstChild(_2c3,"/schmap:schmappletmenu");
navMenu.navName=_2c5.getAttribute("name");
var _2c6=_2c4.getChildren(_2c5,"schmap:L1Entry");
navMenu.bigMenus=map(function(_2c7){
var _2c8={};
_2c8.text=_2c4.getSingleChildText(_2c7,"schmap:Text");
_2c8.link=_2c4.getSingleChildText(_2c7,"schmap:Link");
_2c8.styleString=_2c7.getAttribute("style");
_2c8.indent=_2c7.getAttribute("indent");
var _2c9=_2c4.getChildren(_2c7,"schmap:L1SubEntry");
_2c8.midMenus=map(function(_2ca){
var _2cb={};
_2cb.text=_2c4.getSingleChildText(_2ca,"schmap:Text");
_2cb.link=_2c4.getSingleChildText(_2ca,"schmap:Link");
_2cb.submenu=_2c4.getFirstChild(_2ca,"schmap:Submenu");
var _2cc=_2c4.getChildren(_2cb.submenu,"schmap:L2Entry");
_2cb.smallMenus=map(function(_2cd){
var _2ce={};
_2ce.text=_2c4.getSingleChildText(_2cd,"schmap:Text");
_2ce.link=_2c4.getSingleChildText(_2cd,"schmap:Link");
_2ce.count=_2c4.getSingleChildText(_2cd,"schmap:Count");
return _2ce;
},_2cc);
return _2cb;
},_2c9);
return _2c8;
},_2c6);
try{
if(navMenu.loaded){
$("guide-hotswap-frame").contentWindow.buildMenu(navMenu,navMenu.div,true);
navMenu.loaded=false;
}
if(parent){
parent.buildDropDown(navMenu,schmapplet.sid);
if(parent.document.getElementById("teamSelect")){
var _2cf=parent.document.getElementById("teamSelect");
var _2d0=_2cf.options.length;
for(var i=0;i<_2d0;i++){
if(subtitle==_2cf.options[i].text){
_2cf.options[i].selected=true;
break;
}
}
}
}
}
catch(e){
}
}
function logTimeAll(_2d2){
try{
var _2d3=top.schmapplet.lastLoggedTime;
top.schmapplet.lastLoggedTime=new Date();
if(_2d3===undefined){
logDebug(_2d2,"-- counting time");
}else{
logDebug(_2d2,"--",(top.schmapplet.lastLoggedTime-_2d3)/1000,"seconds");
}
}
catch(e){
}
}
function changeTitleContent(_2d4){
$("subtitle-p").innerHTML=_2d4;
if(schmapplet.places[schmapplet.selected].id==schmapplet.uplace.id){
$("TitleIn").innerHTML=_2d4;
}
schmapplet.uplace.sdesc=_2d4;
schmapplet.places[0].name=_2d4;
updateParentIframeCode();
}
function changeDescContent(_2d5){
if(schmapplet.places[schmapplet.selected].id==schmapplet.uplace.id){
showElement("ShortDescIn");
$("ShortDescIn").innerHTML=_2d5;
}
schmapplet.uplace.sdesc=_2d5;
schmapplet.places[0].sdesc=_2d5;
updateParentIframeCode();
}
function checkonPlace(_2d6,_2d7){
if(typeof (schmapplet.places[schmapplet.selected])!="undefined"&&schmapplet.places[schmapplet.selected].zoomedIn){
zoomInOut.apply("zoom-p");
}
showMyPlace=true;
initilized=0;
isFinished=0;
unbreakIERun=0;
if((_2d6&&!_2d7)||(!_2d6&&_2d7)){
parent.setPlaceCheckEnabled(!_2d6,!_2d7);
}else{
parent.setPlaceCheckEnabled(true,true);
}
if(!_2d6){
showMyPlace=false;
isPlaceOnly=false;
placesChecked=0;
}
if(_2d7){
isPlaceOnly=false;
if(typeof (schmapplet.noPhoto)!="undefined"){
noPhotosAtAll=schmapplet.noPhoto;
}
schmapplet.uplaceonly=null;
if(!_2d6){
placesChecked=1;
}else{
placesChecked=0;
}
if(fixedPlace!=null){
schmapplet.placeid=fixedPlace;
}else{
schmapplet.placeid=null;
}
}else{
if(!_2d7&&_2d6){
isPlaceOnly=true;
schmapplet.places=[];
schmapplet.places[0]=schmapplet.uplace;
noPhotosAtAll=true;
schmapplet.uplaceonly="true";
placesChecked=0;
schmapplet.placeid=null;
}
}
setSubtitle();
createPage();
updateParentIframeCode();
}
function changeGeo(geo){
var lng=geo.lng();
var lat=geo.lat();
schmapplet.uplace.geo[0]=lat;
schmapplet.uplace.geo[1]=lng;
var _2db=new MochiKit.Maps.Point(lat,lng);
schmapplet.uplace.geocode=_2db;
schmapplet.uplace.marker.reposition(_2db);
schmapplet.uplace.markerbig.reposition(_2db);
var _2dc=findContainingGuide(geo);
if(parent){
if((_2dc==""||(_2dc.toLowerCase()!=parent.currGuide.toLowerCase()))&&(_2dc!="err")){
if(_2dc==""){
guide_hotswap_showed=true;
var _2dd=true;
if(typeof (schmapplet.topleft)!="undefined"&&schmapplet.topleft!="undefined"&&schmapplet.topleft!=null&&typeof (schmapplet.bottomright)!="undefined"&&schmapplet.bottomright!="undefined"&&schmapplet.bottomright!=null){
var tl=schmapplet.topleft.split(",");
var br=schmapplet.bottomright.split(",");
var _2e0=tl[0];
var west=tl[1];
var _2e2=br[0];
var east=br[1];
if(lat<_2e0&&lat>_2e2&&lng>west&&lng<east){
_2dd=false;
}
}
if(_2dd){
schmapplet.topleft=(lat+0.05)+","+(lng-0.05);
schmapplet.bottomright=(lat-0.05)+","+(lng+0.05);
loadingEmptyGuide=true;
loadNewPlaces("/noguide/empty/places.xml");
}
parent.allowMyPlaceOnlyChecked();
}else{
if(changedUrl!=""){
var url=changedUrl+"/places.xml";
guide_hotswap_showed=true;
loadNewPlaces(url);
parent.enableSchmapCheckBox();
}
}
}
parent.currGuide=_2dc;
}
updateParentIframeCode();
}
function findContainingGuide(geo){
var lng=geo.lng();
var lat=geo.lat();
try{
if(countriesMenu&&countriesMenu.bigMenus.length>0){
var _2e8=countriesMenu.bigMenus;
var _2e9=_2e8.length;
for(var i=0;i<_2e9;i++){
var _2eb=_2e8[i];
var _2ec=_2eb.text;
var _2ed=_2eb.midMenus.length;
for(var j=0;j<_2ed;j++){
var _2ef=_2eb.midMenus[j];
var _2f0=_2ef.smallMenus.length;
for(var z=0;z<_2f0;z++){
var _2f2=_2ef.smallMenus[z];
var url=_2f2.link;
var _2f4=url.split("/");
var _2f5=_2f4[1];
changedUrl=_2f2.link;
var _2f6=_2f2.geobox;
var _2f7=_2f6.split(",");
var _2f8=_2f7[2];
var _2f9=_2f7[0];
var east=_2f7[3];
var west=_2f7[1];
if(lat<=_2f8&&lat>=_2f9&&lng>=west&&lng<=east){
return (_2f5);
}
}
}
}
}
}
catch(e){
return ("err");
}
return ("");
}
function changeIcon(_2fc,_2fd){
var _2fe=_2fd+"-normal.png";
schmapplet.uplace.marker.setImage(_2fe);
var _2ff=_2fd+"-over.png";
schmapplet.uplace.markerbig.setImage(_2ff);
schmapplet.uplace.id=_2fc;
schmapplet.uplace.schmapIcon=_2fc;
updateParentIframeCode();
}
function copyObject(_300){
var _301={};
for(var _302 in _300){
_301[_302]=_300[_302];
}
return _301;
}
function createPage(){
schmapplet.hasStats=false;
if(typeof (xparams)!="undefined"&&xparams["disableLinks"]=="yes"){
schmapplet.disableLinks=true;
}
if(isGuideSchmapplet){
if(subtitle.length>0){
$("subtitle-p").innerHTML=subtitle;
try{
if(!initialized&&parent){
if(parent.document.getElementById("teamSelect")){
var _303=parent.document.getElementById("teamSelect");
var _304=_303.options.length;
for(var i=0;i<_304;i++){
if(subtitle==_303.options[i].text){
_303.options[i].selected=true;
logDebug("########   "+_303.options[i].text);
break;
}
}
}
}
}
catch(e){
}
removeElementClass("subtitle-p","heightForSub");
if(typeof (settings.HasBoldSubtitle)!="undefined"&&settings.HasBoldSubtitle=="yes"){
setStyle("subtitle-p",{"font-weight":"bold"});
}else{
setStyle("subtitle-p",{"font-weight":"normal"});
}
if(typeof (settings.DisableTitleLinks)=="undefined"||settings.DisableTitleLinks=="false"||settings["SubTitleLink"]=="true"&&placesChecked){
disconnectAll("subtitle-p","onmouseover");
connect("subtitle-p","onmouseover",showUnderline);
connect("subtitle-p","onmouseout",hideUnderline);
disconnectAll("subtitle-p","onclick");
connect("subtitle-p","onclick",subTitlGo);
setStyle("subtitle-p",{"cursor":"pointer"});
}else{
disconnectAll("subtitle-p","onmouseover");
disconnect("subtitle-p","onclick",subTitlGo);
}
}
}else{
$("title").initTxt=schmapplet.title;
if($("title")!=null){
if(typeof (settings.DisableTitleLinks)=="undefined"||settings.DisableTitleLinks=="false"){
$("title").href=guide_url;
if(isIE6){
connect("title","onmouseover",showUnderline);
connect("title","onmouseout",hideUnderline);
}
}else{
$("title").onclick=null;
connect("title","onmouseover",hideUnderline);
}
}
$("subtitle-div").style.visibility="hidden";
}
schmapplet.photoNodesAll=[];
schmapplet.photos=[];
var _306=[];
var _307=[];
if(loadNewPlace){
for(var i=0;i<schmapplet.places.length;i++){
if(schmapplet.places[i].stickyPlaceType>0){
_307.push(schmapplet.places[i]);
_306.push(schmapplet.places[i].id);
++schmapplet._placesCount;
}
}
}else{
if(typeof (schmapplet.uplace)!="undefined"&&showMyPlace){
schmapplet.placesById[schmapplet.uplace.id]=0;
schmapplet._placesCount=1;
_307.push(schmapplet.uplace);
_306.push(schmapplet.uplace.id);
}
}
var mto=settings.MiniTabOrder;
var mtot=mto.replace("htmltitle1","");
if(mtot.search("htmltitle")!=-1){
if(typeof (settings.HtmlPanel)=="undefined"){
schmapplet.sportsSchedule=true;
}
}
mto=mto.replace(/\s/g,"");
mto=mto.split(",");
schmapplet.pcodeArray=[];
schmapplet.regionArray=[];
if(loadSchmapPlacesFlag&&!isPlaceOnly){
schmapplet.rawPlaces=map(createPlace,schmapplet.placeslist);
schmapplet.noPhoto=noPhotosAtAll;
loadSchmapPlacesFlag=false;
}
if(!isPlaceOnly){
for(var i=0;i<_306.length;i++){
schmapplet.placesById[_306[i]]=i;
}
schmapplet.places=[];
if(_307.length>0&&showMyPlace){
schmapplet.places=schmapplet.places.concat(_307,schmapplet.rawPlaces);
hideElement("subtitle-button-span");
}else{
schmapplet.places=schmapplet.rawPlaces;
showElement("subtitle-button-span");
}
}else{
hideElement("subtitle-button-span");
}
var _30a=mto.length;
$("view-panel").innerHTML="<p id=\"counter\"><span id=\"counter-current\"></span></p>";
tabs=[];
for(var i=0;i<_30a;i++){
var tab=new tabOne();
if(mto[i].indexOf(":0")!="-1"){
var _30c=mto[i].replace(":0","");
tab.hasDetail="no";
}else{
var _30c=mto[i];
}
tab.tabType=_30c;
if(tab.tabType=="htmltitle1"&&!schmapplet.hasStats){
break;
}
if((IEquirks)&&(i)){
appendChildNodes("view-panel",SPAN({id:"view-link-separator"+i},"/"));
}
appendChildNodes("view-panel",SPAN({id:"view-link"+i,"class":"view-link"+(i?"":" first-view-link")}));
if(mto.length==1){
hideElement("view-link0");
}
if(tab.tabType=="htmltitle"){
if((typeof (settings.HtmlPanel)=="undefined"||settings.HtmlPanel.length<=0)&&!schmapplet.usingSTemplate){
continue;
}
if(typeof (settings.HtmlPanel)!=="undefined"){
$("article-frame").src=settings.HtmlPanel;
}else{
$("schedule").innerHTML="";
schmapplet.sportsSchedule=true;
setStyle("schedule",{"bottom":"122px"});
}
if(ifRemoveFutherGames()){
if(isNotUndefOrNull(settings.htmltitleForResultView)){
buildViewTab(tab,settings.htmltitleForResultView,"schedule");
}else{
buildViewTab(tab,settings.htmltitle,"schedule");
}
}else{
buildViewTab(tab,settings.htmltitle,"schedule");
}
if(tab.tabRealView==schmapplet.tabLink){
schmapplet.tabLinkOrder=i;
}
}else{
if(tab.tabType=="maptitle"){
buildViewTab(tab,settings.MapTitle,"map");
if(tab.tabRealView==schmapplet.tabLink){
schmapplet.tabLinkOrder=i;
}
}else{
if(tab.tabType=="miniphotostitle"){
photoTabSN=i;
if(i==0&&typeof (schmapplet.tabLink)=="undefined"){
isPhotoView=true;
}
buildViewTab(tab,settings.miniphotostitle,"photos");
if(tab.tabRealView==schmapplet.tabLink){
schmapplet.tabLinkOrder=i;
isPhotoView=true;
}else{
}
}else{
if(tab.tabType=="detailtitle"){
buildViewTab(tab,settings.DetailTitle,"details");
schmapplet.hasDetailTab=true;
if(tab.tabRealView==schmapplet.tabLink){
schmapplet.tabLinkOrder=i;
}
}else{
if(tab.tabType=="htmltitle1"){
if(!schmapplet.hasStats){
break;
}
buildViewTab(tab,settings.htmltitle1,"stats");
setStyle("statsContent",{"height":document.body.clientHeight-24-75-schmapplet.advertH+"px"});
map(function(ele){
setStyle(ele,{"margin-left":document.body.clientWidth/2-5+"px"});
},["upArrowStats","disupStats","downStats","disdownStats"]);
schmapplet.hasHtml1Tab=true;
if(tab.tabRealView==schmapplet.tabLink){
schmapplet.tabLinkOrder=i;
}
}
}
}
}
}
tabs.push(tab);
}
if(typeof (schmapplet.tabOrder)=="undefined"){
schmapplet.tabOrder=0;
}
var _30e="#view-link"+(tabs.length-1);
changeStyleSheetColor(_30e,"borderRightColor",4);
var _30f=tabs.length;
for(i=0;i<_30f;i++){
var _310="view-link"+i;
var _311=tabs[i];
$(_310).innerHTML=_311.tabText;
if(typeof (_311.tabAlt)!="undefined"){
$(_310).title=_311.tabAlt;
}
$(_310).order=i;
}
map(function(el){
var hook=analyticsHooks.schedTabClick;
if(el.id=="view-link1"){
hook=analyticsHooks.mapTabClick;
}else{
if(el.id=="view-link2"){
hook=analyticsHooks.statsTabClick;
}
}
analyticsConnect(el,"onclick",changeView,hook);
},getElementsByTagAndClassName("SPAN","view-link"));
showView(schmapplet.tabLinkOrder);
if(schmapplet.sportsSchedule){
var _314=$("canvas").clientWidth+2;
if(_314<=180){
var _30f=tabs.length;
for(var i=0;i<_30f;i++){
$("view-link"+i).style.fontSize="9px";
}
}
}
schmapplet.selected=0;
if(typeof (schmapplet.placeid)!=="undefined"&&schmapplet.placeid!=null){
var _315=schmapplet.placesById[schmapplet.placeid];
if(_315!==undefined){
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected=_315;
setCurrentCounter(schmapplet.selected+1);
}else{
schmapplet.selected=0;
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
setCurrentCounter(1);
}
}else{
if(isPlaceOnly){
schmapplet.uplace.highlight();
setCurrentCounter(1);
}else{
schmapplet.selected=0;
schmapplet.placeid=schmapplet.places[schmapplet.selected].id;
setCurrentCounter(1);
}
}
logTime("Finished creating places ... about to make the map");
if(!initialized){
if($("map").addEventListener){
$("map").addEventListener("DOMMouseScroll",captureWheel,false);
}else{
connect("map","onmousewheel",captureWheel);
}
}
$("map").style.position="absolute";
$("map2").style.position="absolute";
if(!isIE6){
$("map").style.width="";
$("map").style.height="";
$("map2").style.width="";
$("map2").style.height="";
}
if(!schmapplet.autoplay){
autoPlaying=false;
}else{
autoPlaying=true;
}
if(autoPlaying&&!flash_d){
num=0;
flashPlayButton();
}
for(var i=0;i<tabs.length;i++){
removeElementClass($("view-link"+i),"disabled-view-link");
$("view-link"+i).style.cursor="pointer";
if(i>0){
addElementClass($("view-link"+i),"view-link");
}
}
var _316=tabs.length;
if(noPhotosAtAll&&photoTabSN>=0){
removeElementClass("view-link"+photoTabSN,"current-view-link");
addElementClass("view-link"+photoTabSN,"disabled-view-link");
_316--;
if(tabs.length>(photoTabSN+1)){
removeElementClass("view-link"+(photoTabSN+1),"view-link");
}
if(isIE6||isIE7){
if(photoTabSN!==0){
addElementClass("view-link-separator"+photoTabSN,"disabled-view-link");
}else{
if(tabs.length>(photoTabSN+1)){
addElementClass("view-link-separator"+(photoTabSN+1),"disabled-view-link");
}
}
}
}else{
if(photoTabSN>=0){
removeElementClass("view-link"+photoTabSN,"disabled-view-link");
if(isIE6||isIE7){
if(photoTabSN!==0){
removeElementClass("view-link-separator"+photoTabSN,"disabled-view-link");
}else{
if(tabs.length>(photoTabSN+1)){
removeElementClass("view-link-separator"+(photoTabSN+1),"disabled-view-link");
}
}
}
}
}
if(schmapplet.sportsSchedule){
createSchedule();
}
makeThumbPhotos();
logDebug("nowTabsNum ",_316);
if(_316==1){
for(var i=0;i<tabs.length;i++){
removeElementClass($("view-link"+i),"current-view-link");
addElementClass($("view-link"+i),"disabled-view-link");
changeViewByOrder(schmapplet.tabOrder,0);
}
}else{
var _317=$("view-link"+schmapplet.tabLinkOrder);
if(isPhotoView&&noPhotosAtAll){
var _318=0;
changeViewByOrder(schmapplet.tabOrder,_318);
}else{
changeViewByOrder(schmapplet.tabOrder,_317.order);
}
}
initialized=1;
loadNewPlace=false;
if(initialized||!isPhotoView){
try{
if($("loading-message-guide")){
setStyle("loading-message-guide",{"visibility":"hidden"});
}
}
catch(e){
logDebug("mmmm",e);
}
$("guide-hotswap-div").style.visibility="hidden";
$("section-hotswap-div").style.visibility="hidden";
section_hotswap_showed=false;
guide_hotswap_showed=false;
loadingNewSchmapplet=false;
}
if(schmapplet.usingSTemplate){
if(zoomLevel>0){
$("zoom-p").style.visibility="visible";
}
}
if(settings.MiniMenuOverrideName!="undefined"&&settings.MiniMenuOverrideName!=null&&settings.MiniMenuOverrideName.length>0){
var _319="/xml/"+settings.MiniMenuOverrideName;
guideSrcXml="/common/minicitiesmenu.html?"+_319+"&Countries";
truncationNeeded=0;
}
if(typeof (settings.isGuideSchmapplet)!="undefined"&&settings.isGuideSchmapplet.match(/true/i)){
if(showTwoMenus[0]==1){
callLater(5,function(){
if(guideLoaded==0){
if($("guide-hotswap-div").innerHTML==""){
$("guide-hotswap-div").innerHTML=guideHtml;
}
$("guide-hotswap-frame").contentWindow.location.replace(guideSrcXml);
guideLoaded=1;
}
});
}
if(showTwoMenus[1]==1){
if(sectionLoaded==0){
if($("section-hotswap-div").innerHTML==""){
$("section-hotswap-div").innerHTML=sectionHtml;
}
sectionSrcXml=getSectionSrcXml(schmapplet.uid,settings.MiniMenu2OverrideName);
if(BrowserDetect.browser==="Firefox"){
$("section-hotswap-frame").contentWindow.document.body.innerHTML="";
}
callLater(5,function(){
$("section-hotswap-frame").contentWindow.location.replace(sectionSrcXml);
});
sectionLoaded=1;
}
}
}
if(typeof (settings.RemoveLinksOverride)!="undefined"){
var uids=settings["RemoveLinksOverride"].split(",");
removeLinks=false;
for(var i=0;i<uids.length;i++){
if(uids[i]==schmapplet.uid){
removeLinks=true;
}
}
if(removeLinks){
removeLargeTemplateLinks();
}
}
logTime("Schmaplet completely loaded",true);
}
function removeLargeTemplateLinks(){
disconnect($("title-link").lastChild,"onclick",mainTitlGo);
connect($("title-link").lastChild,"onmouseover",hideUnderline);
disconnectAll("subtitle-p","onmouseover");
setStyle("subtitle-p",{"cursor":"default"});
disconnectAll("subtitle-p","onclick");
disconnect(schmapplet.map.markersElement,"onclick",mainTitlGo);
setStyle(schmapplet.map.markersElement,{"cursor":"default"});
disconnect(schmapplet.map.imgElement,"onclick",mainTitlGo);
setStyle(schmapplet.map.imgElement,{"cursor":"default"});
disconnectAll("TitleIn","onmouseover");
disconnectAll("TitleIn","onclick");
setStyle("TitleIn",{"cursor":"default"});
}
function changingColor(_31b){
schmapplet.colorset=parse_colorset(_31b);
if(schmapplet.colorset[15]=="5C5A4E"){
schmapplet.colorset[15]=newDefaultDetailsStripColor;
}
if(schmapplet.colorset[19]=="F0EFDA"){
schmapplet.colorset[19]="FFEA97";
}
apply_colorset(schmapplet.colorset,colorset_template,/embedded.css$/);
}
function hasPlayedGames(i){
for(j=0;j<schmapplet.regionArray[i].regionArray.length;j++){
var _31d=schmapplet.regionArray[i].played[j];
if(_31d){
return true;
}
}
return false;
}
function createSchedule(){
$("schedule").innerHTML="<div id=\"upArrowDiv\" class=\"ArrowDIV\" style=\"display: block;\"><img id=\"upArrow\" class=\"upArrow\" src=\"/images/pageiconstest/up.gif\" style=\" display: none;\"/><img id=\"disup\" class=\"upOrDown\" src=\"/images/pageiconstest/disup.gif\" style=\" display: block;\"/></div><div id=\"scheduleborad\" style=\"overflow:hidden;\"></div><div id=\"downArrowDIV\" class=\"ArrowDIV\" style=\"display: block;\"><img id=\"down\" class=\"upOrDown\" src=\"/images/pageiconstest/down.gif\" style=\" display: block;\"/><img id=\"disdown\" class=\"upOrDown\" src=\"/images/pageiconstest/disdown.gif\" style=\"display: none;\"/></div>";
var _31e=new Date();
var _31f=schmapplet.months[_31e.getMonth()];
var _320=schmapplet.months[_31e.getMonth()+1];
var _321=0;
var _322=schmapplet.pcodeArray.length;
var _323=0;
var _324=0;
var _325=0;
schmapplet.gameDayArray=[];
for(i=0;i<_322;i++){
var _327=DIV({"class":"sportsMonth"},schmapplet.pcodeArray[i]);
_327.num="";
if(schmapplet.pcodeArray[i].substr(0,3)==_31f&&schmapplet.pcodeArray[i].substr(schmapplet.pcodeArray[i].length-4)==_31e.getFullYear()){
_323=_321;
}else{
if(schmapplet.pcodeArray[i].substr(0,3)==_320&&schmapplet.pcodeArray[i].substr(schmapplet.pcodeArray[i].length-4)==_31e.getFullYear()){
_325=_321;
}
}
if(i==_322-1){
_324=_321;
}
_321++;
if(ifRemoveFutherGames()){
if(hasPlayedGames(i)){
appendChildNodes("scheduleborad",_327);
connect(_327,"onmouseover",changeBG);
connect(_327,"onmouseout",changeBGback);
}else{
}
}else{
appendChildNodes("scheduleborad",_327);
connect(_327,"onmouseover",changeBG);
connect(_327,"onmouseout",changeBGback);
}
for(j=0;j<schmapplet.regionArray[i].regionArray.length;j++){
var day=DIV({"class":"sportsDay"},schmapplet.regionArray[i].regionArray[j]);
day.num=schmapplet.regionArray[i].placeNum[j];
day.url=schmapplet.regionArray[i].url[j];
day.played=schmapplet.regionArray[i].played[j];
day.divIndex=_321;
_321++;
if(ifRemoveFutherGames()){
if(day.played){
appendChildNodes("scheduleborad",day);
}
}else{
appendChildNodes("scheduleborad",day);
}
if(day.url!=""&&!schmapplet.disableLinks){
analyticsConnect(day,"onclick",goToSportsUrl,analyticsHooks.schedGameLink);
setStyle(day,{"cursor":"pointer"});
}
connect(day,"onmouseover",changeBG);
connect(day,"onmouseout",changeBGback);
schmapplet.gameDayArray.push(day);
}
}
var _329=parseInt($("schedule").style.bottom)-34;
if(isGuideSchmapplet){
var _32a=document.body.clientHeight-75-37-_329-schmapplet.advertH;
setStyle("scheduleborad",{"height":_32a+"px"});
}else{
var _32a=document.body.clientHeight-75-37-_329+$("subtitle-div").clientHeight-schmapplet.advertH;
setStyle("scheduleborad",{"height":_32a+"px"});
}
map(function(ele){
setStyle(ele,{"margin-left":document.body.clientWidth/2-5+"px"});
},["upArrow","disup","down","disdown"]);
schmapplet.comingGame=null;
var _32c=schmapplet.gameDayArray.length;
for(var i=_32c-1;i>=0;i--){
var _32d=schmapplet.gameDayArray[i];
if(typeof (_32d.played)!="undefined"&&_32d.played!=0){
if(_32d!=null){
schmapplet.comingGame=_32d;
_323=schmapplet.comingGame.divIndex;
break;
}else{
schmapplet.comingGame=schmapplet.gameDayArray[0];
_323=schmapplet.comingGame.divIndex;
}
}else{
schmapplet.comingGame=schmapplet.gameDayArray[0];
_323=schmapplet.comingGame.divIndex;
}
}
if(_323&&_323!=0){
$("schedule").currentIndex=_323;
}else{
if(_323==0&&_325!=0){
$("schedule").currentIndex=_325;
}else{
$("schedule").currentIndex=_324;
}
}
if(schmapplet.comingGame){
changeBG.apply(schmapplet.comingGame);
}
callLater(0.1,function(){
if($("loading-message-guide").style.visibility=="hidden"&&$("schedule").style.visibility=="visible"){
jugdeArticle();
}
jugdescroll($("schedule"));
});
}
function startScoll(){
if(!schmapplet.scrollTimerStarted){
schmapplet.currentSrollObj=this.scrollObj;
schmapplet.scrollTimer=setInterval("scollingDown()",20);
schmapplet.scrollTimerStarted=1;
}
}
function changeBG(){
schmapplet.sportsBG=getStyle("schedule","backgroundColor");
if(typeof (schmapplet.comingGame)!="undefined"&&schmapplet.comingGame!=null){
removeElementClass(schmapplet.comingGame,"backDay");
addElementClass(schmapplet.comingGame,"schedule");
}
if(typeof (schmapplet.gameDayArray[schmapplet.selected])!="undefined"){
removeElementClass(schmapplet.gameDayArray[schmapplet.selected],"backDay");
addElementClass(schmapplet.gameDayArray[schmapplet.selected],"schedule");
}
addElementClass(this,"backDay");
if(this.num==undefined){
return;
}
setCurrentCounter(this.num);
if(this.num==""){
return;
}
schmapplet.places[schmapplet.selected].unhighlight();
schmapplet.selected=this.num-1;
schmapplet.places[this.num-1].highlight();
}
function changeBGback(){
removeElementClass(this,"backDay");
addElementClass(this,"schedule");
setCurrentCounter(schmapplet.selected+1);
if(this.num==""){
return;
}
addElementClass(schmapplet.gameDayArray[schmapplet.selected],"backDay");
}
function scollingDown(){
schmapplet.currentSrollObj.scrollTop+=4;
if(schmapplet.scrolldownFlag){
endScoll();
return;
}
jugdescroll(schmapplet.currentSrollObj.parentNode);
}
function startuScoll(){
if(!schmapplet.scrollTimerStarted){
schmapplet.currentSrollObj=this.scrollObj;
schmapplet.scrollTimer=setInterval("scollingUp()",20);
schmapplet.scrollTimerStarted=1;
}
}
function scollingUp(){
schmapplet.currentSrollObj.scrollTop-=4;
jugdescroll(schmapplet.currentSrollObj.parentNode);
}
function endScoll(){
schmapplet.scrollTimerStarted=0;
clearInterval(schmapplet.scrollTimer);
schmapplet.scrollTimer=null;
}
function goToSportsUrl(){
window.open(this.url);
}
function jugdescroll(_32e){
var _32f=_32e.childNodes[1];
if(_32e.id=="schedule"&&schmapplet.IEquirks){
var temH=getElementDimensions(_32f).h-10;
}else{
var temH=getElementDimensions(_32f).h;
}
if(_32f.scrollHeight<=temH){
hideElement(_32e.firstChild);
hideElement(_32e.lastChild);
_32f.style.marginTop="10px";
}else{
showElement(_32e.firstChild);
showElement(_32e.lastChild);
_32f.style.marginTop="0px";
if(_32f.scrollTop<=0){
hideElement(_32e.firstChild.firstChild);
showElement(_32e.firstChild.lastChild);
}else{
showElement(_32e.firstChild.firstChild);
hideElement(_32e.firstChild.lastChild);
_32e.firstChild.scrollObj=_32f;
connect(_32e.firstChild,"onmouseover",startuScoll);
connect(_32e.firstChild,"onmouseout",endScoll);
}
if(_32f.scrollHeight-getElementDimensions(_32f).h<=_32f.scrollTop&&_32f.scrollTop>=0){
hideElement(_32e.lastChild.firstChild);
showElement(_32e.lastChild.lastChild);
}else{
showElement(_32e.lastChild.firstChild);
hideElement(_32e.lastChild.lastChild);
_32e.lastChild.scrollObj=_32f;
connect(_32e.lastChild,"onmouseover",startScoll);
connect(_32e.lastChild,"onmouseout",endScoll);
}
}
}
function formatDate(){
var now=new Date();
var _332=(now.getFullYear()+"").substring(2);
var _333=now.getMonth()+1;
var _334=now.getDate();
_333+="";
_334+="";
if(_333.length<2){
_333="0"+_333;
}
if(_334.length<2){
_334="0"+_334;
}
var _335=_334+_333+_332;
return _335;
}
function getSiInUrl(_336,_337){
var _338=_336.toString();
_338=_338.replace("&sit=","&si=");
if(typeof (schmapplet.si)!="undefined"&&schmapplet.si){
var _339=schmapplet.si.split("-");
var _33a=_339.length-1;
switch(_33a){
case 0:
var _33b=formatDate();
_33b="-"+_33b;
var _33c=Math.random()+"";
_33c=_33c.split(".");
var _33d=_33b+_33c[1].substr(0,6);
_33d=schmapplet.si+_33d;
if(_337){
_33d="&si="+_33d;
_338=_338+_33d;
}else{
_338=_338.replace(schmapplet.si,_33d);
}
_336.buffer=[_338];
return _336;
case 1:
var _33b=formatDate();
_33b="-"+_33b;
var _33c=Math.random()+"";
_33c=_33c.split(".");
var _33d=_33b+_33c[1].substr(0,6);
_33d=schmapplet.si+_33d;
if(_337){
_33d="&si="+_33d;
_338=_338+_33d;
}else{
_338=_338.replace(schmapplet.si,_33d);
}
_336.buffer=[_338];
return _336;
case 2:
var _33e=_339[0]+"-"+_339[2];
var _33b=formatDate();
_33b="-"+_33b;
var _33c=Math.random()+"";
_33c=_33c.split(".");
var _33d=_33b+_33c[1].substr(0,6);
_33d=_33e+_33d;
if(_337){
_33d="&si="+_33d;
_338=_338+_33d;
}else{
_338=_338.replace(schmapplet.si,_33d);
}
_336.buffer=[_338];
return _336;
}
}else{
var _33b=formatDate();
var _33c=Math.random()+"";
_33c=_33c.split(".");
var _33d=_33b+_33c[1].substr(0,6);
_33d="SCHMAP-"+_33d;
_336.append("&si=").append(_33d);
}
return _336;
}
function uninstall(){
clearMapLeaks();
}
function getPlaceInfoStyle(_33f){
var _340=_33f.replace("PlaceStrip","");
if(typeof (settings[_33f])!="undefined"&&settings[_33f].match(/no/i)){
hideElement(_340);
}else{
if(typeof (settings[_33f])!="undefined"){
$(_340).className="";
var _341=settings[_33f].split(":");
if(_341.length>1){
var _342=_341[1];
var _343=_342.length;
for(var j=0;j<_343;j++){
var _345=_342.charAt(j);
_345+="-placeInfo";
addElementClass(_340,_345);
}
}
}
}
}
function getTrunction(_346,_347,num){
var _349=$(_346).initTxt;
if(typeof (_349)=="undefined"){
_349="";
}else{
if(isIE6){
_347-=10;
}
if($(_346).className.indexOf("n-placeInfo")!=-1){
var _34a=$(_346).initTxt;
if(_34a.length*num>_347){
var _34b=Math.round(_347/num);
var _34c=_34a;
if(_34b+3<=_34a.length){
_349=_34c.substr(0,_34b)+"...";
}
}
}
}
return _349;
}
function overwriteXparams(){
if(typeof (xparams_ov)=="undefined"){
return;
}
var _34d=keys(xparams_ov);
for(i=0;i<_34d.length;i++){
var _34e=_34d[i];
if(_34e=="mapLogo"){
if(xparams_ov["mapLogo"].substr(xparams_ov["mapLogo"].length-5,1)=="0"){
schmapplet.mapLogo=xparams_ov["mapLogo"];
continue;
}
}
if(_34e=="logoLink"){
schmapplet.logoLink=xparams_ov["logoLink"];
}
xparams[_34e]=xparams_ov[_34e];
}
}
function jugdeArticle(){
if($("scheduleborad")){
var _34f=$("scheduleborad").scrollHeight-$("schedule").currentIndex*20;
var _350=getElementDimensions("scheduleborad").h-_34f;
if(_350>0){
$("scheduleborad").scrollTop=$("scheduleborad").scrollHeight-getElementDimensions("scheduleborad").h;
}else{
$("scheduleborad").scrollTop=$("schedule").currentIndex*20;
}
}
}
if(trackPage){
var pageTracker;
addScript("/common/ga.js",function(){
pageTracker=_gat._getTracker("UA-2919908-1");
pageTracker._initData();
pageTracker._trackPageview();
});
}
function createGMarker(map,_352){
if((settings.ZoomHideIcons!==undefined)&&(map.hideAll!==undefined)){
if(typeof (_352.gmarkerbig)=="undefined"){
var _353=new MochiKit.Maps__Google.Point(schmapplet.places[schmapplet.selected].geo[0],schmapplet.places[schmapplet.selected].geo[1]);
var _354=mapiconspath+schmapplet.places[schmapplet.selected].schmapIcon+"-over.png";
var _355=new MochiKit.Maps__Google.Icon(_354,new MochiKit.Style.Dimensions(settings.OverIconSize[0],settings.OverIconSize[1]),new MochiKit.Style.Coordinates(schmapplet.overAnchorX,schmapplet.overAnchorY));
var _356=new MochiKit.Maps__Google.Marker(_353,_355);
_352.gmarkerbig=_356;
_356.placeid=_352.id;
schmapplet.map2.addItem(_352.gmarkerbig);
}else{
_352.gmarkerbig.show();
}
map.hideAll(settings.ZoomHideIcons);
}
}
function checkPhotoFinished(){
if($("photo-p").firstChild.complete){
$("loading-message-guide").style.visibility="hidden";
$("photo-table").style.visibility="visible";
return;
}else{
callLater(0.01,checkPhotoFinished);
}
}
function showMyPanel(evt){
$("copyright-hotswap-div").style.visibility="visible";
if($("copyrightTxt")){
$("copyright").onclick=function(){
window.open("http://www.schmap.com/copyright/sportswidgets");
$("copyright-hotswap-div").style.visibility="hidden";
};
}
}
function hideMyPanel(evt){
if(isMouseInsideContainer(evt,"infoEle","copyright-hotswap-div")){
return;
}
$("copyright-hotswap-div").style.visibility="hidden";
}
function isMouseInsideContainer(evt,_35a,_35b){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var _35e=getElementPosition(_35a);
var _35f=getElementDimensions(_35a);
var pos=getElementPosition(_35b);
var dim=getElementDimensions(_35b);
if(schmapplet.IEquirks){
mx+=1;
my+=1;
}
if(my<=pos.y){
if(my>_35e.y+1&&mx>_35e.x&&mx<(_35e.x+_35f.w)){
return true;
}
}else{
if(my<(pos.y+dim.h)&&mx>pos.x&&mx<(pos.x+dim.w)){
return true;
}
}
return false;
}
function gotoMylink(){
window.open("http://www.schmap.com/widgets");
$("copyright-hotswap-div").style.visibility="hidden";
}
function isMouseInsideSchmappletText(evt){
var mx=evt.mouse().client.x;
var my=evt.mouse().client.y;
var _365=getElementPosition("whatsthis");
var _366=getElementDimensions("whatsthis");
var pos=getElementPosition("GetSchmappletText");
var dim=getElementDimensions("GetSchmappletText");
if(schmapplet.IEquirks){
mx+=1;
my+=1;
}
if(!showed){
return false;
}
if(my>=(pos.y+dim.h)){
if(my<(_365.y+_366.h)&&mx>_365.x&&mx<(_365.x+_366.w)){
return true;
}
}else{
if(my>pos.y&&mx>pos.x&&mx<(pos.x+dim.w)){
return true;
}
}
return false;
}
function buildViewTab(tab,_36a,_36b){
if(typeof (_36a)!="undefined"){
var _36c=_36a.split("|");
if(_36c.length>1){
tab.tabAlt=_36c[1];
tab.tabRealView=_36b;
tab.tabDiv=$(_36b);
}else{
tab.tabRealView=_36b;
tab.tabDiv=$(_36b);
}
var _36d=_36c[0].split(",");
if(_36d.length>1){
var _36e=_36d.length;
for(var i=0;i<_36e;i++){
var _370={};
var _371=_36d[i].split(":");
_370.name=_371[0];
_370.len=_371[1];
tab.displayedObj.push(_370);
}
}
tab.tabText=_36c[0];
}
if(schmapplet.sportsSchedule&&tab.displayedObj.length>1){
var _372=$("canvas").clientWidth+2;
for(var i=0;i<tab.displayedObj.length;i++){
var _373=tab.displayedObj[i];
if(_372<=_373.len){
tab.tabText=_373.name;
break;
}
}
}
}
function changePhoto(){
hideElement(this);
this.imgMouseover.style.display="inline";
}
function changePhotoBack(){
hideElement(this);
this.imgMouseout.style.display="inline";
}
function stripTitleGo(){
var url=new StringBuffer();
url.append("http://").append(window.location.host).append("/").append(schmapplet.uid).append("/").append(schmapplet.sid).append("/#p=");
var _375=schmapplet.places[schmapplet.selected].id;
url.append(_375);
var _376="";
if(settings["WidgetLinkPopupWidth"]){
_376+="width="+settings["WidgetLinkPopupWidth"];
}
if(settings["WidgetLinkPopupHeight"]){
_376+=", height="+settings["WidgetLinkPopupHeight"];
}
window.open(url.toString(),"",_376);
}
function getPageTitle(){
if(typeof (schmapplet)!="undefined"&&schmapplet.uid){
var _377="schmap "+schmapplet.uid+" widget";
}else{
var _377=pageTitle;
}
return _377;
}
function doSubmit(){
document.typepadform.submit();
}
function installToTypepad(){
if($("iframecode")){
$("typepad_content").value=$("iframecode").value;
}else{
$("typepad_content").value=$("code").value;
}
setTimeout(doSubmit,0);
return true;
}
function installToBlogger(_378,_379){
var _37a=getPageTitle();
if($("iframecode")){
var _37b=escape($("iframecode").value);
}else{
var _37b=escape($("code").value);
}
_37b=_37b.replace("/","%2F");
window.open(_378+"?blogurl="+_37b+"&title="+_37a,"_blank","height="+screen.height+",width="+screen.width+",toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes,z-look=yes");
}
function installToLive(_37c,obj,_37e){
var _37f=getPageTitle();
if($("iframecode")){
var _380=escape($("iframecode").value);
}else{
var _380=escape($("code").value);
}
_380=_380.replace("/","%2F");
var host=document.location.hostname;
var url="http://"+host+"/plugins/live/download.php";
xmlHttp=getXMLHttpRequest();
xmlHttp.onreadystatechange=function(){
handleLiveStateChange(_37c,obj,_37e);
};
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send("src="+_380+"&title="+_37f);
}
function handleLiveStateChange(_383,obj,_385){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var _386=xmlHttp.responseText;
_386=escape(_386);
_386=_386.replace("%2F","/");
_386=_386.replace("%3A",":");
logDebug(_386);
if(_385){
window.open(_383+"?liveurl="+escape(xmlHttp.responseText),"_blank","height="+screen.height+",width="+screen.width+",toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes,z-look=yes");
}else{
open(_383+"?liveurl="+escape(xmlHttp.responseText));
}
}
}
}
var xmlHttp;
function installToWordpress(){
installTo("/plugins/wordpress/download.php",handleWordpressStateChange);
}
function installToDrupal(){
installTo("/plugins/drupal/download.php",handleDrupalStateChange);
}
function installToGoogle(){
var _387=getPageTitle();
if($("iframecode")){
var code=$("iframecode").value;
}else{
var code=$("code").value;
}
var _389=/src="(.*)"/;
var cid=_389.exec(code);
var host=document.location.hostname;
var url="http://"+host+"/plugins/google/download.php";
xmlHttp=getXMLHttpRequest();
xmlHttp.onreadystatechange=handleGoogleStateChange;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if($("widget_name")){
var _38d=$("widget_name").innerHTML;
}else{
var _38d=_387;
}
xmlHttp.send("src="+escape(cid[1])+"&title="+escape(_38d));
}
function installTo(_38e,_38f){
if($("iframecode")){
var code=escape($("iframecode").value);
}else{
var code=escape($("code").value);
}
var host=document.location.hostname;
var url="http://"+host+_38e;
xmlHttp=getXMLHttpRequest();
xmlHttp.onreadystatechange=_38f;
xmlHttp.open("POST",_38e,true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send("src="+code);
}
function handleGoogleStateChange(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var _393=xmlHttp.responseText;
_393=escape(_393);
open("http://www.google.com/ig/adde?source=atgs&moduleurl="+_393,"_blank");
}
}
}
function handleDrupalStateChange(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var _394=xmlHttp.responseText;
if(!isIE6){
_394=escape(_394);
}
_394=_394.replace("/","%2F");
window.open("/plugins/drupal/download.html?downlink="+_394,"PopupPage","height=450,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,z-look=yes");
}
}
}
function handleWordpressStateChange(){
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var _395=xmlHttp.responseText;
_395=escape(_395);
_395=_395.replace("/","%2F");
window.open("/plugins/wordpress/download.html?downlink="+_395,"PopupPage","height=450,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no,z-look=yes");
}
}
}



