/* FILE ARCHIVED ON 20:51:32 Nov 10, 2011 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 6:57:02 Jul 23, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ drawPortal("denverpost", "puzzle"); function get(name) { var q = unescape(location.search.substring(1)).split(/[=&]/); for (var j=0; j= 2) return stringValue; if (stringValue.length == 1) return ("0" + stringValue); return "00"; } /****************************************************************************************/ /* Draws portal for puzzlesd and horoscopes */ function drawPortal(clientID, contentType, contentID) { // get url vars not passed outside of handler var content_name = get("content_name"); var content_category = get("content_category"); var date = get("date"); var printout = get("printout"); var splash_type = get("splash_type"); var featured_puzzles = "yes"; if (printout==null) printout="no"; // check top URL to see if request is coming from staging server var topUrl = document.URL; var stageSearch = (topUrl.indexOf('puzzlestage')); if (stageSearch > -1) { var portalType = "stage"; } else { var portalType = "s"; } if (contentID!=null) { // puzzle can only be alacarte based on this request; ignore content_name var isAlacarte = "yes" } else { var isAlacarte = "no" } // if ((content_name==null) && (contentID!=null)) { if (contentID!=null) { var content_name = contentID; } // if it's a sample, default to first day of last month, if no month is provided if ((date==null) && (clientID=="sample_alacarte")){ var tempDate = new Date(); var curYear = tempDate.getFullYear(); var curMonth = tempDate.getMonth(); var sampleDate=new Date(curYear, curMonth-1, 0); sampleDate.setDate(sampleDate.getDate()+1); // add a day date = dateToString(sampleDate); } // set base iframe url var viewURL = "http://"+contentType+portalType+".kingdigital.com/"; // i.e., contentType+portalType may be "puzzles", "puzzlestage", "horoscopes", "horoscopestage" // build out iframe url viewURL += (contentType+"_server/view_"+contentType+".php?client="+clientID+"&printout="+printout+"&alacarte="+isAlacarte); var adHeight = 354; // remove space at bottom that would otherwise be occupied by "featured puzzles" if (isAlacarte=="yes") { adHeight = adHeight - 140; } else if (featured_puzzles=="no") { if (content_name!=null) { adHeight = adHeight - 140; } } // set portal height and width if (contentType=="puzzle") { // default width & height for puzzles var portalWidth = 540; // set exceptions switch(content_name) { case 'battleship': portalHeight = 1296 + adHeight; break; case 'calcudoku': portalHeight = 1325 + adHeight; break; case 'crazywords': portalHeight = 810 + adHeight; break; case 'crypto': portalHeight = 835 + adHeight; break; case 'hashi': portalHeight = 1091 + adHeight; break; case 'joseph': portalHeight = 760 + adHeight; break; case 'kakuro': portalHeight = 1160 + adHeight; break; case 'kakuro_easy': portalHeight = 1160 + adHeight; break; case 'kakuro_hard': portalHeight = 1160 + adHeight; break; case 'picapix': portalHeight = 1145 + adHeight; break; case 'premier': portalHeight = 1170 + adHeight; break; case 'psych': portalHeight = 790 + adHeight; break; case 'sheffer': portalHeight = 760 + adHeight; break; case 'sud_dailyink': portalHeight = 890 + adHeight; portalWidth = 800; break; case 'sud_classic': portalHeight = 1090 + adHeight; break; case 'sud_classic_easy': portalHeight = 1090 + adHeight; break; case 'sud_classic_hard': portalHeight = 1090 + adHeight; break; case 'sud_diagonal': portalHeight = 1090 + adHeight; break; case 'sud_irregular': portalHeight = 1090 + adHeight; break; case 'sud_mega': portalHeight = 1090 + adHeight; break; case 'sud_multi': portalHeight = 1090 + adHeight; break; case 'sud_sum': portalHeight = 1115 + adHeight; break; case 'wordsleuth': portalHeight = 710 + adHeight; break; default: // code for splash page var portalHeight = 750; // var portalHeight = 530 + adHeight; } if (printout=="yes") portalHeight = 1225; } else if (contentType=="horoscope") { // default width & height for horoscopes var portalWidth = 590; var portalHeight = 200; // set exceptions switch(content_name) { case 'bigar_star': portalHeight = 2000; break; case 'bigar_weather': portalHeight = 2000; break; case 'bigar_number': portalHeight = 2000; break; case 'drake': portalHeight = 1300; break; default: } } if (content_category!=null) { viewURL += ("&content_category="+content_category+"\""); // set exceptions for categories switch(content_category) { case 'sudoku': portalHeight = 345 + adHeight; break; case 'kakuro': portalHeight = 245 + adHeight; break; case 'hashi': portalHeight = 245 + adHeight; break; case 'battleship': portalHeight = 245 + adHeight; break; case 'picapix': portalHeight = 245 + adHeight; break; case 'kenken': portalHeight = 245 + adHeight; break; case 'calcudoku': portalHeight = 245 + adHeight; break; case 'crosswords': portalHeight = 245 + adHeight; break; case 'games': portalHeight = 345 + adHeight; break; default: // code to be executed if n is different from case 1 and 2 } } if (content_name!=null){ // content name is specified if (date!=null){ // date is specified viewURL += ("&date="+date); // +"&content_name="+content_name); } viewURL += ("&content_name="+content_name); // +"\""); } if (splash_type!=null){ // content name is specified viewURL += ("&splash_type="+splash_type); // +"&content_name="+content_name); } // draw portal document.write(""); } // End -->