var emid = "00000000000000000000000000000000"; /* Button Script v0.32 * * (c)2009 Emdigo, Inc. * All Rights Reserved */ var embs = []; var emcid; // Consumer var empid; // Phone var emoem; // OEM var emcar; // Carrier var emhit; // Views var emsnd; // Button clicks var emnum; // Number var emcom; // Company var emapp; // Application var emtbn; // Button div var emanm; // Application name var emaid; // Application ID var emone; // App oneliner var empub; // App publisher var emsta; // Send status var emerr = ""; var emsho = 0; var emtol = 0; var emrec; var emamp; var emsel; var emmed = 'http://www.igetitmobile.com/button/'; var emtm; var emval; var emind = 0; // Indicate whether we're in a js dialog box var ema = {'x':0,'y':0,'f':0}; var emrnd; var emissafari = navigator.userAgent.toLowerCase().indexOf( 'safari' ) != -1; var emInitPhoneCallback; var sawinitialscreens = 0; var eminfotab; var emtabwaiting = 0; var empricing; var emfocuselement = null; var emsendinstructions = ""; var emsendstatus = "000"; var emsendmessage = ""; var eminstructionstimeout; var emfollowupmessage; var emcutedots = 0; var emtimeoutonload = 0; var emscrolltext = ""; var emparams = { 'buttonStyle':'d','phoneIconHeight':'42','phoneIconOffsetX':'110','phoneIconOffsetY':'0','buttonHeight':'42','buttonWidth':'156','showButtonNumber':0,'showButtonScroll':1,'scrollText':'NEW! On Your Phone in Seconds! GET IT on Verizon!','buttonNumberOffsetX':'0','buttonNumberOffsetY':'42','buttonNumberColor':'#bbb','showButtonText':'0','buttonTextOffsetX':'44','buttonTextOffsetY':'28','buttonTextColor':'#fff','showPhoneSelector':1,'showRelatedApps':1,'autoShowBalloon':0,'showPhoneWiggle':1,'chooserOnly':0,'callbackSetPhone':null,'sendToPhoneCallback':null,'setPhoneCallback':null,'showButton':1,'showMoreInfo':0 }; var emcars = {1:"Verizon",2:"Alltel",4:"AT&T",5:"Sprint",7:"T-Mobile",47:"Bell"}; var emoems = {1:"Samsung",2:"LG",3:"Nokia",4:"Motorola",5:"Verizon",6:"Kyocera",7:"Pantech",8:"HTC",9:"Blackberry",10:"Sony Ericsson",11:"Palm",13:"Casio",17:"Audiovox",18:"UTStarcom",12:"AT&T",19:"Apple",34:"HP",16:"Sanyo",14:"Sidekick",15:"T-Mobile",22:"Amoi",28:"Sharp"}; var emphos = {1:{1:{46:"A870 (Siren)",33:"A930",31:"A950",32:"A990",1113:"i760",130:"i770 (Saga)",966:"i910 (Omnia)",1068:"i920 (Omnia II)",475:"U350 (Smooth)",57:"U410",63:"U430",850:"U450 (Intensity)",9:"U470 (Juke)",885:"U490 (Trance)",22:"U540",23:"U550",2:"U620",1146:"U640 (Convoy)",62:"U650 (Sway)",3:"U700 (Gleam)",12:"U740 (Alias)",476:"U750 (Alias 2)",126:"U810 (Renown)",20:"U900 (Flipshot)",11:"U940 (Glyde)",851:"U960 (Rogue)"},2:{1495:"VN250 (Cosmos)",5:"VX 10000 (Voyager)",741:"VX 11000 (enV Touch)",420:"VX 4500",403:"VX 4700/4650",322:"VX 5200",47:"VX 5300",48:"VX 5400",380:"VX 5500",1251:"VX 5600 (Accolade)",404:"VX 6100",29:"VX 7000",1058:"VX 7100 (Glance)",24:"VX 8100",25:"VX 8300",18:"VX 8350",384:"VX 8360",10:"VX 8500 (Chocolate)",999:"VX 8550 (Chocolate 2)",53:"VX 8560 (Chocolate 3)",1115:"VX 8575 (Chocolate Touch)",27:"VX 8600",51:"VX 8610 (Decoy)",17:"VX 8700",8:"VX 8800 (Venus)",14:"VX 9100 (enV2)",1059:"VX 9200 (env3)",15:"VX 9400",412:"VX 9600 (Versa)",59:"VX 9700 (Dare)",26:"VX 9800",4:"VX 9900 (enV)"},3:{407:"2605 (Mirage)",1128:"2705 (Shade)",55:"6205",381:"6215",423:"6235i/6236i",42:"6315i",392:"7205 (Intrigue)",1121:"7705 (Twist)"},4:{748:"A455 (Rival)",1453:"A555 (DEVOUR)",1151:"A855 (DROID)",36:"E815",7:"K1M (KRZR)",40:"L7c (SLVR)",1168:"Q",133:"Q9C",993:"Q9m",320:"QA30 (Hint)",38:"RAZR (Maxx Ve)",310:"V260/V262",37:"V325",6:"V3C (RAZR)",1515:"V3M (RAZR)",409:"V750 (Adventure)",426:"V810",1064:"V860",21:"V9m (RAZR2)",298:"VU204 (Limerick)",61:"VU30 (Rapture)",58:"W385",300:"W755 (Cool)",1127:"W766 (Entice)",19:"Z6c(x) World Edition (Z6c)",301:"Z6TV/Z6c",125:"ZN4 (Krave)"},5:{1111:"8990 (Escapade)",41:"CDM 8940",39:"CDM 8945",400:"CDM 8950",401:"CDM 8975",132:"PN820",995:"SMT5800",60:"TXT 8010 (Blitz)",1129:"TXT8030 (Razzle)",131:"XV6800",128:"XV6900"},6:{297:"K323"},7:{427:"PN-215"},8:{124:"Touch Pro",1148:"ADR6200 (Eris)",1065:"XV6175 (Ozone)",1149:"XV6875 (Touch Pro2)",118:"XV6950 (Touch Diamond)",1150:"XV6975 (Imagio)"},9:{134:"8130 (Pearl)",1061:"8230 (Pearl Flip)",135:"8330 (Curve)",1429:"8530 (Curve)",136:"8703e",1048:"8830 (World Edition)",994:"9530 (Storm)",1067:"9550 (Storm 2)",1066:"9630 (Tour)"},11:{129:"Centro",1254:"Pixi Plus",1253:"Pre Plus"},13:{137:"C711 (Boulder)",1060:"C721 (Exilim)",1172:"C731 (Rock)",1114:"C741 (Brigade)",391:"GZ One Type V",399:"GZ1 Type S"},18:{443:"7075",468:"CDM8915"}},2:{1:{313:"R200",121:"R430 (MyShot)",314:"R500",294:"R510",119:"R600 (Hue II)",117:"R800 (Delve)",315:"U340",1134:"U350 (Glint)",316:"U420",295:"U520",317:"U706"},2:{303:"AX145",304:"AX155",276:"AX245",277:"AX260 (Scoop)",305:"AX275",1133:"AX310",279:"AX355",280:"AX380",306:"AX390",307:"AX4270",308:"AX490",123:"AX500",309:"AX5000",281:"AX565",318:"AX585",282:"AX830 (Glimmer)",283:"AX8600"},3:{424:"2865"},4:{285:"K1M",981:"QA30 (Hint)",978:"V260/V262",287:"V3 (RAZR)",291:"V9m",292:"VE20",311:"W315",293:"Z6m"},6:{275:"KX5"},8:{124:"Touch Pro",118:"XV6950 (Touch Diamond)"}},4:{1:{98:"A117",342:"A127",1145:"A137",918:"A167",1510:"A177",343:"A227",99:"A237",996:"A257 (Magnet)",100:"A437",919:"A517",101:"a637",939:"A657",1475:"A687 (Strive)",1474:"A697 (Sunburst)",344:"A707 (Sync)",917:"A717",102:"A727",103:"A737",109:"A747 (SLM)",104:"A767 (Propel)",105:"a777",1097:"A797 (Flight)",106:"A827 (Access)",107:"A837 (Rugby)",110:"A867 (Eternity)",959:"a877 (Impression)",1119:"A887 (Solstice)",1099:"A897 (Mythic)",374:"C417",920:"D347",945:"D357",916:"D407",347:"D807",933:"i607 (Blackjack)",111:"i617 (Blackjack II)",957:"i627 (Propel Pro)",1044:"i637 (Jack)",108:"i907 (Epix)",1093:"i910 (Omnia)",183:"X497",929:"X507",947:"ZX20"},2:{935:"C1300",932:"C1500",948:"C2000",325:"CB630 (Invision)",76:"CE110",326:"CF360",327:"CF750",1139:"CG180",328:"CG225",956:"CG300",1140:"CP150",77:"CT810 (INCITE)",952:"CU320",329:"CU400/CU405",330:"CU500",78:"CU515",331:"CU575 (Trax)",79:"CU720 (Shine)",372:"CU915 (Vu)",1070:"CU920 (Vu)",1141:"F7200",1071:"GD710 (Shine 2)",958:"GR500 (Xenon)",963:"GT365 (Neon)",1154:"GW820 (Expo)",1142:"KE850 (Prada)"},3:{1079:"2320/2330",86:"2600",88:"2610",1125:"2660",964:"2680",1080:"2720",960:"3220",338:"6030",943:"6061",91:"6085",912:"6102i",339:"6126",934:"6230",1126:"6350",89:"6555",90:"6650",953:"6682",1041:"6750",1081:"6780",1109:"6790 (Surge)",1047:"E71/E71x",1485:"E72",924:"N75",1082:"N95"},4:{1488:"Backflip",1143:"C168",938:"E1 (ROKR)",1252:"EM30 (MOTOROKR)",332:"EM330 (Denali)",333:"K1 (KRZR)",936:"L2",927:"L6",334:"L7 (SLVR)",1174:"Maxx V6",81:"Q9",1042:"QA1 (Karma)",82:"RAZR V3",83:"RAZR V3i",335:"RAZR V3xx",1173:"RAZR2 V8",84:"RAZR2 V9",373:"RAZR2 V9x",896:"V180/188",914:"V190",937:"V220",921:"V235",923:"V365",1593:"V3r",336:"V3xxR",941:"V400",949:"V551/V557",337:"VA76r (Tundra)",1518:"W760r",85:"Z9"},7:{942:"C120",915:"C150",926:"C300",93:"C520 (Breeze)",94:"C530 (Slate)",95:"C610",340:"C630",96:"C740 (Matrix)",1083:"C790 (Reveal)",97:"C810 (Duo)",341:"C820 (Matrix Pro)",1511:"P7000 (Impact)",1144:"PG-C3B"},8:{1138:"Tilt 2",955:"2125 (Faraday)",954:"3125 (Star Trek)",1136:"8100",951:"8125 (Wizard)",950:"8525",946:"8925 (Tilt)",75:"P4600 (FUZE)",1137:"Pure"},9:{1054:"7100g",940:"7130c",1057:"7210",1052:"7230",1056:"7280",1055:"7290",1053:"7730",1051:"7780",142:"8100 (Pearl)",69:"8110 (Pearl)",70:"8120 (Pearl)",928:"8300 (Curve)",71:"8310 (Curve)",141:"8320 (Curve)",1152:"8520 (Curve)",73:"8700c",139:"8800c",72:"8820",1043:"8900 (Curve)",74:"9000 (Bold)",1153:"9700 (Bold)"},10:{1120:"C905",1102:"K300",1103:"K700i",930:"S710a",346:"W300i",112:"W350a",1104:"W518a",113:"W580i (Walkman)",931:"W600i",114:"W760a",375:"W760i",348:"W810i",1105:"W950i",1443:"X10 (Xperia)",115:"Z310a",944:"Z500",925:"Z520a/Z525",116:"Z750a"},11:{92:"Centro",913:"750 (Treo)"},12:{68:"Tilt",67:"GTX75 (Quickfire)"},19:{450:"iPhone"},34:{1167:"iPAQ Glisten"}},5:{1:{1159:"Intrepid",225:"A580",226:"A640",227:"A660",890:"A700",228:"A740",229:"A760",230:"A790",231:"A800",232:"A880",233:"A900M",235:"A920",236:"A960",237:"i325 (Ace)",238:"i600",239:"M220",1118:"M240",240:"M300",241:"M320",1116:"M330",242:"M500",243:"M510",377:"M520 (Lumina)",244:"M540 (Rant)",1046:"M550 (Exclaim)",1117:"M560 (Reclaim)",245:"M610",246:"M620 (Upstage)",247:"M630 (Highnote)",378:"M800 (Instinct)",1123:"M850 (Instinct HD)",1161:"M900 (Moment)",248:"PPC6700",1001:"s30 (Instinct Mini)",249:"Z400"},2:{201:"125",202:"150",207:"350",892:"550 (Fusic)",1487:"LN 510 (Rumor Touch)",203:"LX 160 (Flare)",205:"LX 260 (Rumor)",1045:"LX 265 (Rumor2)",1038:"LX 290",1062:"LX 370",211:"LX 400",210:"LX 550",213:"LX 570 (Muziq)",214:"LX 600 (Lotus)",1175:"LX 610 (Lotus Elite)"},3:{997:"3155i",987:"6165i"},4:{215:"C290",1486:"i890",1000:"i920/i930",216:"ic402",217:"ic502 (Buzz)",891:"ic602 (Buzz+)",218:"ic902",883:"K1M (KRZR)",219:"V3m (RAZR)",349:"V950 (Renegade)",884:"V9m (RAZR2)",376:"VE20"},8:{1157:"Snap",197:"Touch Pro",1163:"Touch Pro2",1162:"Hero (Android)",198:"P3450 (Touch)",196:"PPC-6800 (Mogul)",199:"PPC-6950 (Touch Diamond)"},9:{193:"7100i",194:"7130e",192:"7520",1033:"8130 (Pearl)",971:"8330 (Curve)",1484:"8330m",1034:"8350i",1155:"8530 (Curve)",195:"8703e",140:"8830",1160:"9630 (Tour)"},11:{1132:"Centro",893:"600 (Treo)",221:"650 (Treo)",222:"700P (Treo)",223:"700wx (Treo)",122:"755p (Treo)",224:"800w",1255:"Pixi",1256:"Pre",1519:"Treo Pro"},16:{252:"2300",253:"2400",894:"2700",254:"3100",379:"3200",353:"3800 (LX)",1147:"3810",255:"4920",256:"5600",257:"6600 (Katana)",258:"6650 (Katana 2)",259:"6750 (Eclipse)",1250:"6760 (Incognito)",260:"7000",261:"7050",262:"7300",263:"7400",264:"7500",265:"8200",266:"8300",267:"8400",268:"8500 (Katana DLX)",269:"9000",270:"M1",271:"PRO200",272:"PRO700",273:"S1"}},7:{1:{903:"E335",909:"E635",363:"t109",990:"t119",1177:"T139",910:"T209",364:"T219",170:"t229",1036:"T239",171:"t309",172:"t319",169:"T329 (Stripe)",366:"t339",1035:"T349",173:"t409",1516:"T419",174:"t429",367:"T439",368:"T459 (Gravity)",1106:"T469 (Gravity 2)",175:"t509",895:"T519 (Trace)",369:"T539 (Beat)",1107:"T559",176:"t609",177:"t619",178:"t629",370:"t639",1110:"T659 (Scarlet)",897:"T709",179:"t719",167:"T729 (Blast)",168:"t739 (Katalyst)",1063:"T749 (Highlight)",180:"t809",181:"t819",371:"t919 (Behold)",901:"t929 (Memoir)",1496:"T939 (Behold 2)",983:"X495"},3:{358:"1680",1248:"2330",359:"2610",1247:"2720",157:"2760",158:"3220",360:"3555",904:"3595",1508:"3711",1122:"5130",1514:"5230",159:"5300 (XpressMusic)",160:"5310",161:"5610",163:"6086",164:"6101",165:"6103",166:"6133",899:"6136",361:"6263",1171:"6300i",362:"6301",908:"7510"},4:{905:"A630",902:"C650",1476:"Cliq XT",152:"E8 (ROKR)",144:"K1 (KRZR)",1165:"MB200 (Cliq)",145:"U6 (PEBL)",979:"V180/188",355:"V195",324:"V3 (RAZR)",153:"V300",154:"V330",155:"V360",147:"V3r (RAZR V3r)",907:"V600",150:"V8 (RAZR2)",988:"W233 (Renew)",911:"W450 (ACTV)",156:"W490",151:"Z3 (RIZR)",357:"ZN5 (Zine)"},8:{1164:"Dash 3G",189:"G1",1513:"HD2",1195:"Nexus One",1166:"Touch Pro2",900:"Shadow 2"},9:{967:"8100 (Pearl)",143:"8120 (Pearl)",906:"8220 (Pearl Flip)",968:"8320 (Curve)",1108:"8520 (Curve)",138:"8700g",969:"8800",970:"8820",965:"8900 (Curve)",1135:"9700 (Bold)"},10:{187:"TM506",1131:"TM717 (Equinox)",1517:"W580i"},14:{184:"LX",185:"Slide",186:"2008",1176:"LX 2009"},15:{188:"Dash",1130:"myTouch 3G",190:"Shadow",191:"Wing",1249:"7519 (Tap)"}},47:{1:{1022:"Ace World Edition",1019:"Cleo",1002:"Omnia",1228:"A580",1229:"A660",1231:"A680",1230:"A860",1224:"A900",1198:"A920",1202:"M300",1020:"M320",1196:"M330",1220:"M500",1219:"M510",1197:"M530",1217:"M560 (Reclaim)",1218:"M610",1225:"M620",1226:"R610",1201:"SCH-800 (Instinct)",1232:"U440 (Cleo)",1021:"U740"},2:{1013:"Reveal",1012:"Rumor",1221:"Rumor 2",1031:"Vantage",1014:"Voyager",1015:"Wine",1235:"3300",1236:"385",1238:"5400",1233:"5550",1234:"6200",1239:"8700",1216:"GR500 (Xenon)"},3:{1246:"2855i",1242:"6275i",1227:"N97"},4:{1244:"E815",1028:"K1M",1222:"QA30 (Hint)",1026:"V3 (RAZR)",1027:"V9M",1029:"Z6M"},8:{1008:"Touch",1009:"Touch Diamond",1011:"Touch Dual",1010:"Touch Pro"},9:{1007:"8130 (Pearl)",1004:"8230 (Pearl Flip)",1005:"8330 (Curve)",1003:"9530 (Storm)"},11:{1018:"Centro",1017:"Treo Pro"},16:{1023:"Katana",1030:"Katana Eclipse",1199:"2400",1243:"4920",1223:"7500",1025:"PRO-200",1024:"PRO-700",1200:"S1"},17:{1245:"8450",1237:"8615",1241:"8910",1240:"8930"}}}; function excookies() { emcid = exbst( emid.substr( 3, 6 ) ); empid = exbst( emid.substr( 9, 3 ) ); emoem = exbst( emid.substr( 12, 2 ) ); emcar = exbst( emid.substr( 14, 2 ) ); emhit = exbst( emid.substr( 16, 3 ) ); emsnd = exbst( emid.substr( 19, 3 ) ); emnum = exbst( emid.substr( 22, 6 ) ); } function tocookies( dosave, sc ) { emid = "000"; emtm = tobst( emcid ); emid = emid + new Array( 6 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( empid ); emid = emid + new Array( 3 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( emoem ); emid = emid + new Array( 2 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( emcar ); emid = emid + new Array( 2 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( emhit ); emid = emid + new Array( 3 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( emsnd ); emid = emid + new Array( 3 - String(emtm).length + 1 ).join( '0' ) + emtm; emtm = tobst( emnum ); emid = emid + new Array( 6 - String(emtm).length + 1 ).join( '0' ) + emtm; emid = emid + "0000"; if ( typeof dosave == "undefined" || dosave != 0 ) // clean this up emit( sc ); } function emit( sc ) { if ( !emissafari ) { document.getElementById( 'em-imgdiv' ).innerHTML = ''; } else { document.getElementById( 'em-button-form-i-element' ).value = emid; document.getElementById( 'em-button-form-c-element' ).value = emcom; document.getElementById( 'em-button-form-a-element' ).value = escape( emapp ); document.getElementById( 'em-button-form-p-element' ).value = empid; document.getElementById( 'em-button-form-s-element' ).value = sc; document.getElementById( 'em-button-form-url-element' ).value = escape( document.URL ); document.getElementById( 'em-button-form-u-element' ).value = emrnd; document.getElementById( 'em-button-form' ).submit(); } return false; } function exbst( val ) { val = val + ""; var ex = 1; var asc; var bt = 0; for( var i=val.length-1; i>=0; i-- ) { asc = val.charCodeAt( i ); if ( asc >= 48 && asc <= 57 ) asc -= 48; else if ( asc >= 65 && asc <= 90 ) asc -= 55; else asc -= 61; bt = bt + asc*ex; ex *= 62; } return bt; } function tobst( val, pos ) { if ( typeof pos == "undefined" ) { for( pos=0; pos<8; pos++ ) { if ( Math.pow( 62, pos+1 ) > val ) break; } } var dig = parseInt( val/Math.pow( 62, pos ) ); if ( dig >= 0 && dig <= 9 ) return dig + "" + ( pos == 0 ? "" : tobst( val - Math.pow( 62, pos )*dig, pos-1 ) ); else if ( dig >= 10 && dig <= 35 ) return String.fromCharCode( dig + 55 ) + ( pos == 0 ? "" : tobst( val - Math.pow( 62, pos )*dig, pos-1 ) ); else return String.fromCharCode( dig + 61 ) + ( pos == 0 ? "" : tobst( val - Math.pow( 62, pos )*dig, pos-1 ) ); } function getWindowDims() { if ( typeof window.innerWidth != 'undefined' ) return {'w':window.innerWidth,'h':window.innerHeight}; else if ( typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0 ) return {'w':document.documentElement.clientWidth,'h':document.documentElement.clientHeight}; else return {'w':document.getElementsByTagName('body')[0].clientWidth,'h':document.getElementsByTagName('body')[0].clientHeight}; } function getMousePos( e ) { e = e || window.event; if ( e.pageX || e.pageY ) return {'x':e.pageX,'y':e.pageY}; else return {'x':e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) - ( document.documentElement.clientLeft || 0 ),'y':e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) - ( document.documentElement.clientTop || 0 )}; } function getElementPos( elem ) { var curleft = 0; var curtop = 0; if ( elem.offsetParent ) { do { // if ( elem.style.position != "undefined" && (elem.style.position == "relative" || elem.style.position == "absolute") ) // break; curleft += elem.offsetLeft; curtop += elem.offsetTop; } while( elem = elem.offsetParent ); } return {'x':curleft,'y':curtop}; } function getBalloonTopLeft() { var dims = getWindowDims(); var pos = getElementPos( document.getElementById( 'em-the-button' ) ); var left = dims['w'] - pos['x'] - 142/2 > 375 ? 0 : 1; var top = pos['y'] - 42/2 > 435 ? 1 : 0; return {'top':( top == 1 ? pos['y'] - 425 : pos['y'] + 25 ),'left':( left == 1 ? pos['x'] - 200 : pos['x'] + 0 ),'flat':( top == 1 ? 'top' : 'bottom' ),'pos':(( top == 1 ? 'top' : 'bottom' )+( left == 1 ? 'left' : 'right' ))}; } /* Cross-browser listener installation. Code from: http://snipplr.com/view/561/add-event-listener/ * * @param el Element to attach to * @param evt Event name without preceding "on" * @param fn Function name or anonymous function * @param cap Capture (true) or bubble (false, default) the event * */ function addListener( evt, fn, cap ) { if ( typeof window.addEventListener == 'function' ) // W3C - Mozilla/Firefox, Safari/Opera window.addEventListener( evt, fn, cap ); else // IE document.attachEvent( 'on' + evt, fn ); } function dropListener( el, evt, fn ) { if ( window.removeEventListener ) window.removeEventListener( evt, fn, false ); else if ( document.detachEvent ) document.detachEvent( 'on' + evt, fn ); } // BALLOON MAIN DISPLAY ENTRY POINT function showBalloonMain( isclick, nosend ) { if ( emparams.chooserOnly == 1 ) { showCarriers(); turnoverlayon(); } else if ( typeof isclick != "undefined" && isclick == 1 ) { clearHoverTimeout(); // Make sure we don't show a hover after we clicked // Logic for showing on click if ( empid == 0 ) { showOptions(); emit( 'show-checkavail-click' ); /* showCarriers(); turnoverlayon(); hideBalloon(); */ } else { if ( emval != 1 ) showNotAvailable(); else { if ( typeof nosend == "undefined" && emnum != 0 && String(emnum).length == 10 ) { doSend(); } else { showAvailable(); if ( typeof nosend == "undefined" ) showPhoneEntry(); else { if ( emval != 1 || String(emnum).length < 10 ) showPhoneEntry(); } } } } } else { // Logic for showing on hover if ( empid == 0 ) { showOptions(); emit( 'show-checkavail-hover' ); } else { if ( emval != 1 ) showNotAvailable(); else showAvailable(); } } } function showOptions() { var contents = '' + emanm + '' + ( emone.length > 0 ? emone : 'Select your phone to determine availability. If available, you can send "' + emanm + '" directly to your phone.' ) + ( emparams.showMoreInfo == 1 && typeof emurl != 'undefined' && emurl.length > 0 ? ' More info...' : ' Publisher: ' + empub + '' ) + '
'; contents = contents + '
'; contents = contents + ''; contents = contents + '
 Check AvailabilitySelect phone...
Select your phone to get pricing information for your carrier and phone model.
OR, Send it Now!
Enter your 10 digit mobile number and the product screen will be sent to you. You will not be billed until you confirm on your phone.
Mobile #    '; contents = contents + '  
'; showBalloon( 'Check Availability for FREE', contents, "y", "q" ); setTimeout( 'document.getElementById( "empidnumber" ).focus();', 500 ); if ( emind == 0 ) { emind = 1; setTimeout( 'emind = 0;', 7000 ); } attachToKeyPress(); } function showSelectPhone() { var contents = '' + emanm + '<\/SPAN>' + ( emone.length > 0 ? emone : 'Select your phone to determine availability. If available, you can send "' + emanm + '" directly to your phone.' ) + '
'; contents = contents + getPhoneBar(); contents = contents + 'No purchase necessary. Enter your phone to check availability of the application for your handset.'; showBalloon( 'Check Availability for FREE', contents, "y", "q" ); emit( 'show-checkavail-after-select' ); } function showNotAvailable() { var contents = ''; contents = contents + 'NOT on Your Phone!' + emanm + ' is not available for the ' + emcars[emcar] + ' ' + emoems[emoem] + ' ' + emphos[emcar][emoem][empid] + '. If this is not your carrier and phone model, select a new phone....
'; contents = contents + getPhoneBar(); if ( emparams.showRelatedApps != 1 ) { contents = contents + 'TIP: Availability differs by phone. Click the "Not Your Phone?" link to look for another phone.'; } else { // if ( typeof emrec != "undefined" && emrec.all.length > 0 ) if ( typeof emrec != "undefined" && typeof emrec.pub != "undefined" && typeof emrec.pub[emcom] != "undefined" && emrec.pub[emcom].length > 0 ) { contents = contents + 'Popular Apps for Your Phone:'; var emc = 0; var emseq = getRandomSeq( emrec.pub[emcom].length > 8 ? 8 : emrec.pub[emcom].length, 0 ); for( var i=0; i' + app.n + '
'; if ( ++emc >= 8 ) break; } } else { contents = contents + 'NO Apps Available for Your Phone'; contents = contents + 'There appear to be no apps available for your phone from ' + empub + '. If you have an older phone, it is possible that your model is no longer supported by most publishers. If this is not your carrier or phone model, select the "Not Your Phone?" link above to change the phone selection. Availability varies significantly by phone.'; } } showBalloon( 'Not Available!', contents, "d", "x" ); emit( 'show-notavail' ); } function getRecommended( num, exclude ) { var emrecstr = ''; var emc = 0; var emseq = getRandomSeq( emrec.pub[emcom].length > num+1 ? num+1 : emrec.pub[emcom].length, 0 ); for ( var emi in emseq ) { if ( emrec.pub[emcom][ emseq[emi] ] == exclude ) continue; var app = emamp[ emrec.pub[emcom][ emseq[emi] ] ]; emrecstr = emrecstr + '' + app.n + ''; if ( ++emc >= num ) break; } return emrecstr; } function getRandomSeq( l, start ) { if ( l > 26 ) return false; var seq = {}; if ( typeof start == "undefined" ) start = 0; var emc; l += start; while( start < l ) { emc = String.fromCharCode( 65 + Math.floor( Math.random() * 26 ) ); if ( typeof seq[ emc ] == "undefined" ) seq[ emc ] = start++; } var somevar = []; for( var emc=65; emc<91; emc++ ) { if ( typeof seq[ String.fromCharCode( emc ) ] != "undefined" ) { somevar[ somevar.length ] = seq[ String.fromCharCode( emc ) ]; } } return somevar; } function showAvailable() { var contents = '' + emanm + ''+ ( emone.length > 0 ? emone : 'This application is available. You can send "' + emanm + '" directly to your phone.' ) + ( emparams.showMoreInfo == 1 && typeof emurl != 'undefined' && emurl.length > 0 ? ' More info...' : ' Publisher: ' + empub + '' ) + '
' + ( empid != 0 && typeof empri[ emsup[ empid ] ] != "undefined" ? empri[ emsup[ empid ] ] : 'Pricing not Available' ) + ''; contents = contents + '' + emanm + ' is Available!Send the product screen to your phone for free*. To download ' + emanm + ', you will then need to confirm the purchase on your phone.'; contents = contents + getPhoneBar(); contents = contents + '*Standard airtime and messaging charges may apply'; showBalloon( 'Send to Your Phone NOW', contents, "g", "p" ); emit( 'show-avail' ); } function showSend( message ) { emind = 1; // Keep the balloon up while we send var contents = '
'; contents = contents + '
' + emoems[emoem] + ' ' + emphos[emcar][emoem][empid] + ''; contents = contents + '

' + message + '
'; contents = contents + '*Standard airtime and messaging charges may apply'; showBalloon( 'Sending ' + emanm + '', contents, "g", "p" ); emit( 'show-send-' + emaid ); } function getPhoneBar() { var contents = '
' + getPhoneBarContents() + '
'; return contents; } function getPhoneBarContents() { var contents = '
 '; if ( empid > 0 ) { contents = contents + '' + emoems[emoem] + ' ' + emphos[emcar][emoem][empid] + ''; } else { contents = contents + ''; } contents = contents + ' '; if ( emnum != 0 && String(emnum).length == 10 ) { contents = contents + 'XXX-XXX-' + String(emnum).substring(6,10) + "
"; } if ( empid > 0 ) { contents = contents + emcars[emcar] + ' ' + emoems[emoem] + ' ' + emphos[emcar][emoem][empid] + '
' + getSelectPhoneLink( 'Not Your Phone?' ) + ' | Clear...
   '; if ( emval == 1 ) { if ( emnum != 0 && String(emnum).length == 10 ) { contents = contents + 'Get It'; } else { contents = contents + 'Get It'; } } } else { contents = contents + '' + getSelectPhoneLink( 'Select your phone...', '(No purchase necessary)' ) + ''; } return contents + '
'; } function showPhoneEntry() { document.getElementById( 'em-phone-bar' ).innerHTML = getPhoneEntry(); setTimeout( function() { var el = document.getElementById( 'empidnumber' ); if ( el ) el.focus(); }, 500 ); emind = 1; emit( 'show-phoneentry' ); } function getPhoneEntry() { var html = "
 \"" Enter the mobile number for this phone:
"; if ( emval == 1 ) html = html + "
<\/FORM>"; else html = html + " <\/FORM>"; setTimeout( 'document.getElementById( "empidnumber" ).focus();', 500 ); attachToKeyPress(); return html; } function getSelectPhoneLink( linkname, adtxt ) { var html = '' + ( typeof linkname == "undefined" ? 'Not Your Phone?' : linkname ) + '' + ( typeof adtxt != 'undefined' ? ' ' + adtxt + '' : '' ); } function showBalloon( title, contents, c, ic ) { var elem = document.getElementById( 'em-balloon-wrapper' ); if ( !elem ) return false; if ( typeof ematt != "function" ) attachToMouseMove(); var pos = getBalloonTopLeft(); if ( pos['flat'] == "top" ) emhtml = ''; else emhtml = ''; emhtml = emhtml + '
    ' + title + '
'; emhtml = emhtml + contents; emhtml = emhtml + 'Get Help...'; if ( typeof emcom != 'undefined' && emcom == 3 ) emhtml = emhtml + 'Service by Emdigo subject to its privacy policy'; emhtml = emhtml + '
'; if ( pos['flat'] == "top" ) emhtml = emhtml + ''; else emhtml = emhtml + ''; elem.innerHTML = emhtml; var emch = document.getElementById( 'em-balloon-wrapper' ).offsetHeight; // clientHeight, offsetHeight var emcw = document.getElementById( 'em-balloon-wrapper' ).offsetWidth; /* if ( pos['flat'] == "top" ) { if ( emch < 355 ) elem.style.top = ( pos['top'] + ( 355 - emch ) ) + "px"; else elem.style.top = ( pos['top'] - ( emch - 355 ) ) + "px"; } else { elem.style.top = pos['top']; // Height of balloon doesn't matter when it is below the button } */ if ( pos['flat'] == 'top' ) // top-oriented (above button) balloon { elem.style.top = ( 20 - emch ) + 'px'; } else { elem.style.top = '20px'; } if ( pos['pos'] == 'topleft' || pos['pos'] == 'bottomleft' ) { elem.style.left = ( 156 - emcw ) + 'px'; } else { elem.style.left = '0px'; } elem.style.visibility = "visible"; emsho = 1; } function hideBalloon() { var elem = document.getElementById( 'em-balloon-wrapper' ); if ( elem ) { elem.innerHTML = ""; elem.style.visibility = "hidden"; } if ( typeof ematt == "function" ) // Hiding balloon, so remove the mouse-position-test function { dropListener( document.all ? document : window, 'mousemove', ematt, false ); ematt = null; } if ( typeof emkfn == "function" ) // Hiding balloon, so remove the key-tracking function { dropListener( document.all ? document : window, 'keypress', emkfn, false ); emkfn = null; } resetSendStatus(); } // Confirm clearing of phone selection function doAskClear() { emind = 1; if ( confirm( "Really clear phone selection?\n\nThis will clear the phone selection for this browser. To check application availability or send other applications to your phone, you will need to select another phone. If this is not your phone, click the Cancel button, then select the \"Not Your Phone?\" link to make a new selection." ) ) { doClear(); showBalloonMain(); } setTimeout( function() { emind = 0; }, 4000 ); } function doClear() { emcid = empid = emoem = emcar = emsnd = emnum = 0; if ( typeof emsel != "undefined" ) { emsel.c = 0; emsel.o = 0; emsel.s = 0; } emhit = 0; updateButtonStatus(); tocookies( 1, 'clear-dialog' ); showButton( "get" ); } // Check mouse position against bounding box of balloon and button function outsideBoundingBox( evt ) { var mpos = getMousePos( evt ); var divloc = getElementPos( document.getElementById( 'em-balloon-wrapper' ) ); var outballoon = (mpos['x'] < divloc['x']) || (mpos['x'] > (divloc['x'] + document.getElementById( 'em-balloon-wrapper' ).offsetWidth -1)) || (mpos['y'] < divloc['y']) || (mpos['y'] > (divloc['y'] + document.getElementById( 'em-balloon-wrapper' ).offsetHeight -1)); // var balx = divloc['x'] + 365 -1; divloc = getElementPos( document.getElementById( 'em-the-button' ) ); var outbutton = (mpos['x'] < divloc['x']) || (mpos['x'] > (divloc['x'] + parseInt( emparams.buttonWidth ) -1)) || (mpos['y'] < divloc['y']) || (mpos['y'] > (divloc['y'] + parseInt(emparams.buttonHeight) -1)); // var butx = divloc['x'] + parseInt( emparams.buttonWidth ) -1; divloc = getElementPos( document.getElementById( 'em-button-phone' ) ); var outphone = (mpos['x'] < divloc['x']) || (mpos['x'] > (divloc['x'] + parseInt(parseInt(emparams.phoneIconHeight)*1.3) - 1)) || (mpos['y'] < divloc['y']) || (mpos['y'] > (divloc['y'] + parseInt(emparams.phoneIconHeight) - 1)); return outballoon && outbutton && outphone; } // Function installed as handler for mousemove event when balloon is shown. Tests mouse position is inside // the balloon. Hides balloon when mouse goes outside balloon bbox. function checkBallonOnMouseMove( evt ) { if ( emind == 0 && outsideBoundingBox( evt ) && document.getElementById( 'em-balloon-wrapper' ).style.visibility == 'visible' ) { hideBalloon(); emit( 'hover-off' ); } } /* IE keeps a global reference to the event in the "event" variable. All other browsers automatically pass * the event to event handler functions. So, the "e" parameter below is automatically filled in whereas * the "event" variable is a global in IE. */ function attachToMouseMove() { if ( document.all ) { addListener( 'mousemove', ematt = function() { checkBallonOnMouseMove( event ); }, false ); } else addListener( 'mousemove', ematt = function(e) { checkBallonOnMouseMove( e ); }, false ); } function showCarriers( back ) { if ( typeof back == "undefined" ) emsel = {'c':0,'o':0,'s':0}; else emsel.o = 0; document.getElementById( "em-app-title" ).innerHTML = ( typeof emanm != "undefined" && emanm.length > 0 ? 'GET IT: ' + emanm : 'Phone Selector' ); sawinitialscreens = 1; emhtml = '

Who is your wireless carrier?

'; for( var i in emphos ) { emhtml = emhtml + '' + emcars[i] + ''; } document.getElementById( "em-div-list" ).innerHTML = emhtml + '
Tip: Your wireless carrier is the company that provides your mobile service. This is the company that bills you monthly for your mobile phone calls.
'; emit( 'show-carriers' ); } function showOEMs( carrier ) { document.getElementById( "em-app-title" ).innerHTML = ( typeof emanm != "undefined" && emanm.length > 0 ? 'GET IT: ' + emanm : 'Phone Selector' ); sawinitialscreens = 1; emsel.c = carrier; emhtml = '

What brand of ' + emcars[emsel.c] + ' phone do you have?

<  BACK TO CARRIERS
'; var sameoemcar = ''; for( var i in emphos[emsel.c] ) { if ( typeof emoems[i] == 'undefined' ) { alert( emsel.c + " " + i ); } if ( emoems[i] == emcars[ emsel.c ] ) { sameoemcar = '
For ' + emoems[i] + ' branded phones, click here.
'; continue; } emhtml = emhtml + '' + emoems[i] + ''; } document.getElementById( "em-div-list" ).innerHTML = emhtml + sameoemcar + '
Tip: The brand manufacturer is usually printed on your phone. If you are not sure, try to find one of these company names or logos somewhere on the outside of your phone.
'; emit( 'show-oems-' + emsel.c ); } function showPhones( carrier, oem ) { document.getElementById( "em-app-title" ).innerHTML = 'Click on the Icon to Select a Phone'; emsel.o = oem; getPhoneBox(); // emhtml = "CARRIER: " + emcars[emsel.c] + "<\/STRONG>, BRAND: " + emoems[emsel.o] + "<\/STRONG> | PREVIOUS<\/A><\/SPAN>
" + emhtml; emhtml = emhtml + '
'; for( var i in emphos[emsel.c][emsel.o] ) { emhtml = emhtml + ''; } document.getElementById( "em-div-list" ).innerHTML = emhtml + "

"; emit( 'show-phones-' + emsel.c + '-' + emsel.o ); } function showBalloonAfterLoad() { if ( emtol > 0 ) { showBalloonMain( 1, 0 ); } else { if ( ++emtm < 15 ) setTimeout( 'showBalloonAfterLoad()', 200 ); } } function selectPhone( p ) { empid = p; emcar = emsel.c; emoem = emsel.o; tocookies( 1, 'select-phone-' + p ); updateButtonStatus(); showButton( 'get' ); hideOverlay(); emtm = 0; emtol = 0; initPhone(); if ( typeof emparams.callbackSetPhone == 'function' ) emInitPhoneCallback = emparams.callbackSetPhone; if ( typeof emparams.setPhoneCallback == 'function' ) { emparams.setPhoneCallback( { 'phone':empid,'carrier':emcar,'oem':emoem } ); } if ( emparams.chooserOnly == 0 ) { if ( emparams.showPhoneSelector == 1 || typeof emsel.s == 1 ) { emind = 1; if ( typeof emsel.s == "undefined" || emsel.s == 0 || emval == 2 ) { setTimeout( function() { emind = 0; }, 10000 ); if ( emval == 2 && emparams.showRelatedApps != 0 ) { // For an unsupported app/phone combo, we need related apps loaded, so go into a timeout loop until ready setTimeout( 'showBalloonAfterLoad()', 300 ); } else { showBalloonMain( 1, 0 ); } } else { doSend(); } } } } function getPhoneBox() { emhtml = '
CHOOSE YOUR PHONE
' + emcars[emsel.c] + '\'s ' + ( emcars[emsel.c] == emoems[emsel.o] ? '' : emoems[emsel.o] + ' ' ) + 'Phones<  BACK TO BRANDS
'; } function attachToKeyPress() { emkfn = onEnterDoClick; addListener( 'keypress', onEnterDoClick, true ); } function onEnterDoClick( e ) { if ( !e ) e = window.event; if ( document.getElementById( 'em-balloon-wrapper' ).style.visibility == "hidden" ) return false; if ( e.keyCode >=48 && e.keyCode <=57 ) return true; if ( document.all && e.keyCode == 13 ) // IE { document.getElementById( 'emsendbutton' ).click(); // e.keyCode = 0; e.cancelBubble = true; e.returnValue = false; } else if ( e && e.which == 13 ) { // Firefox propagates the event to the button without needing to explicitly click // document.getElementById( 'emsendbutton' ).click(); // e.stopPropagation(); // e.preventDefault(); } return false; } function showPhonePad() { emhtml = "


"; document.getElementById( 'emphonepad' ).innerHTML = emhtml; } function pressPhonePad( key ) { var emtemp = document.getElementById( 'empidnumber' ).value; if ( key == -1 ) { if ( emtemp.length > 0 ) { document.getElementById( 'empidnumber' ).value = emtemp.substr( 0, emtemp.length - 1 ); } } else { if ( emtemp.length < 10 ) { document.getElementById( 'empidnumber' ).value = emtemp + key; } } } function turnoverlayon() { document.getElementById( "em-button-overlay" ).style.display = 'block'; /* document.getElementById( "em-button-overlay" ).style.visibility = 'visible'; document.getElementById( "em-overlay-header" ).style.visibility = 'visible'; document.getElementById( "em-overlay-body" ).style.visibility = 'visible'; document.getElementById( "em-overlay-bottom" ).style.visibility = 'visible';*/ return false; } function hideOverlay() { document.getElementById( "em-button-overlay" ).style.display = 'none'; /* document.getElementById( "em-overlay-header" ).style.visibility = 'hidden'; document.getElementById( "em-button-overlay" ).style.visibility = 'hidden'; document.getElementById( "em-overlay-body" ).style.visibility = 'hidden'; document.getElementById( "em-overlay-bottom" ).style.visibility = 'hidden';*/ var emelem = document.getElementById( 'em-more-info' ); if ( emelem ) emelem.style.visibility = 'hidden'; return false; } function saveNumber( n ) { if ( n != n.match( /^[0-9]+$/ ) ) { document.getElementById( 'emnummessage' ).innerHTML = 'Error: phone number must be only numbers'; return false; } if ( n.length != 10 ) { document.getElementById( 'emnummessage' ).innerHTML = 'Error: phone number must be 10 digits'; return false; } if ( n.charAt( 0 ) == '0' || n.charAt( 0 ) == '1' ) { document.getElementById( 'emnummessage' ).innerHTML = 'Error: invalid phone number'; return false; } emnum = n; return true; } function doGetCarrier() { tocookies( 0, 'do-get-carrier' ); var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = emmed + "js/emGetCarrier.js?n=" + emnum; h.appendChild( s ); } function doSend() { tocookies( 0, 'do-send' ); var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = emmed + "js/emSendToPhone.js?c=" + emcom + "&a=" + escape( emapp ) + "&i=" + emid + "&m=button-send&n=" + emnum + "&url=" + escape( document.URL ) + "&r=" + (new Date()).getTime(); h.appendChild( s ); if ( typeof emparams.sendToPhoneCallback == 'function' ) emparams.sendToPhoneCallback( { 'company':emcom,'app':emapp,'customer':emnum,'phone':empid,'carrier':emcar,'oem':emoem } ); if ( emaid == 470 ) doGoo(); } function endSend() { showSend( emsendinstructions ); emtm = 0; emind = 1; showLoading(); } function emGetAllApps() { if ( typeof empid == "undefined" || empid == 0 || typeof emcom == "undefined" || emcom == 0 ) return []; if ( typeof emrec == "undefined" || typeof emrec.pub == "undefined" || typeof emrec.pub[ emcom ] == "undefined" ) return []; var sup = []; for( var i in emrec.pub[ emcom ] ) { if ( typeof emamp[ emrec.pub[ emcom ][ i ] ] != "undefined" ) sup[ i ] = { 'name':emamp[ emrec.pub[ emcom ][ i ] ].n, 'id':emamp[ emrec.pub[ emcom ][ i ] ].r, 'pubid':emamp[ emrec.pub[ emcom ][ i ] ].c }; } return sup; } function doGoo() { var google_conversion_id = 1053389151; var google_conversion_language = "en_US"; var google_conversion_format = "1"; var google_conversion_color = "ffffff"; var google_conversion_label = "rFhpCKnSqAEQ3-Kl9gM"; if (2.5) { var google_conversion_value = 2.5; } var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = "http://www.googleadservices.com/pagead/conversion.js"; h.appendChild( s ); } function showLoading() { if ( document.getElementById( 'em-balloon-wrapper' ) == 'hidden' ) return false; doSendRefresh( "" ); eminstructionstimeout = 0; if ( emsendstatus == '4' || emsendstatus == '0' ) { var eme = document.getElementById( 'emsendstatus' ); if ( eme ) { eme.innerHTML = '

Send Complete'; setTimeout( 'resetSendStatus()', 1000 ); var contents = getRecommended( 8, emaid ); if ( contents.length > 0 ) { contents = 'Other Apps for Your Phone:' + contents; } document.getElementById( 'em-send-message' ).innerHTML = (typeof emfollowupmessage != "undefined" && emfollowupmessage.length > 0 ? emfollowupmessage : emanm + ' was sent to your phone.') + contents; } } else if ( parseInt( emsendstatus ) < 0 ) { var eme = document.getElementById( 'emsendstatus' ); if ( eme ) { eme.innerHTML = '

Failed!'; document.getElementById( 'em-send-message' ).innerHTML = emsendmessage + '

[RETRY]

'; setTimeout( 'resetSendStatus()', 1000 ); } if ( emsendstatus == '012' ) doSendRefresh( "ooc" ); } else if ( parseInt( emsendstatus ) >= 300 ) { var eme = document.getElementById( 'emsendstatus' ); if ( eme ) { eme.innerHTML = '

Failed!'; document.getElementById( 'em-send-message' ).innerHTML = 'Sorry, we were unable to deliver to this number: ' + emnum + '. Check to see that you entered your number correctly and that your handset shows at least one bar of coverage. Response: ' + emsendmessage + '.

[RETRY]

'; setTimeout( 'resetSendStatus()', 1000 ); } if ( emsendstatus == '012' ) doSendRefresh( "ooc" ); } else if ( emtm > 130 ) { var eme = document.getElementById( 'emsendstatus' ); if ( eme ) { eme.innerHTML = '

Possible Problem'; document.getElementById( 'em-send-message' ).innerHTML = 'There may have been a problem delivering to this number: ' + emnum + '. Check to see that you entered your number correctly and that your handset shows at least one bar of coverage. If everything looks ok, then click the RETRY button to attempt to re-send the application to your phone. You may need to unblock services on your phone if you have premium services blocked.

[RETRY]

'; setTimeout( 'resetSendStatus()', 1000 ); } } else { var emmsg = "

"; for( var emi=0; emi 4 ) { emcutedots = 0; } var eme = document.getElementById( 'emsendstatus' ); if ( eme ) { eme.innerHTML = emmsg; eminstructionstimeout = setTimeout( 'showLoading()', 500 ); } ++emtm; } } function resetSendStatus() { emsendstatus = '000'; emsendmessage = ''; emtm = 0; emcutedots = 0; eminstructionstimeout = 0; } function initPhone() { if ( empid > 0 ) { var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = emmed + 'p/' + empid + '/r.js?i=' + emid + "&r=" + (new Date()).getTime(); h.appendChild( s ); } else { emtol++; // Mark step as done when no phone selected } } function initPhoneDone( pid ) { if ( typeof emInitPhoneCallback == 'function' || typeof emparams.callbackSetPhone == 'function' ) { if ( typeof emInitPhoneCallback != 'function' ) emInitPhoneCallback = emparams.callbackSetPhone; emInitPhoneCallback( pid ); emInitPhoneCallback = 0; } } function doSendRefresh( cmd ) { var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = emmed + "js/emSendRefresh.js?c=" + cmd + "&u=" + emcid + "&r=" + (new Date()).getTime(); h.appendChild( s ); } function addStyle() { var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "link" ); s.type = "text/css"; s.rel = "stylesheet"; s.href = emmed + "css/emButton.css?r=" + (new Date()).getTime(); s.media = 'screen'; h.appendChild( s ); } function initApplication() { var h = document.getElementsByTagName( "head" )[0]; var s = document.createElement( "script" ); s.type = "text/javascript"; s.src = emmed + "a/" + emcom + "/" + (emapp.replace( /:/, '-' )).replace( /\'/, '' ) + ".js?i=" + emid + "&r=" + (new Date()).getTime(); h.appendChild( s ); } function showButton( cmd ) { if ( embtn && emparams.showButton == 1 ) { emhtml = emparams.showPhoneSelector == 1 ? '
' : ''; emhtml = emhtml + '
'; emhtml = emhtml + ''; if ( emparams.showButtonText == '1' && emval > 0 ) emhtml = emhtml + ''; if ( emparams.showButtonNumber == 1 ) { emhtml = emhtml + '
' + ( typeof emnum != "undefined" && String(emnum).length == 10 ? 'XXX-XXX-' + String(emnum).substring(6,10) : '' ) + '
'; } else if ( emparams.showButtonScroll == 1 ) { emhtml = emhtml + '
'; setTimeout( 'startScroll()', 2000 ); } emhtml = emhtml + '
'; embtn.innerHTML = emhtml; document.getElementById( 'em-button-phone' ).style.top = emparams.phoneIconOffsetY + 'px'; document.getElementById( 'em-button-phone' ).style.left = emparams.phoneIconOffsetX + 'px'; if ( emparams.showButtonText == '1' && emval > 0 ) { document.getElementById( 'em-button-text' ).style.top = emparams.buttonTextOffsetY + 'px'; document.getElementById( 'em-button-text' ).style.left = emparams.buttonTextOffsetX + 'px'; document.getElementById( 'em-button-text' ).style.color = emparams.buttonTextColor; } if ( emparams.showButtonNumber == '1' || emparams.showButtonScroll == '1' ) { document.getElementById( 'em-text-phonenumber' ).style.top = emparams.buttonNumberOffsetY + 'px'; document.getElementById( 'em-text-phonenumber' ).style.left = emparams.buttonNumberOffsetX + 'px'; document.getElementById( 'em-text-phonenumber' ).style.color = emparams.buttonNumberColor; } clearHoverTimeout(); } } function startScroll() { if ( emscrolltext.length > 0 ) return false; emscrolltext = ' ' + emparams.scrollText + ' '; setTimeout( 'scrollit()', 170 ); } function scrollit() { emscrolltext = emscrolltext.substring( 1 ) + emscrolltext.substring( 0, 1 ); document.getElementById( 'em-text-phonenumber' ).innerHTML = emscrolltext.replace( / /, ' ' ); setTimeout( 'scrollit()', 170 ); } function wiggle() { var bw = document.getElementById( 'em-balloon-wrapper' ); var bo = document.getElementById( "em-button-overlay" ); if ( emval == 0 && bw && bo && bw.style.visibility != 'visible' && bo.style.visibility != 'visible' ) { ema.f++; if ( ema.f > 7 ) { ema.f = 0; } else { var elem = document.getElementById( 'em-button-phone' ); if ( ema.f % 2 == 0 ) { ema.x += 2; elem.style.left = (parseInt( elem.style.left ) + 2) + 'px'; } else { ema.x -= 2; elem.style.left = (parseInt( elem.style.left ) - 2) + 'px'; } setTimeout( 'wiggle()', 120 ); return false; } } // Reset position if ( ema.f == 0 ) { if ( ema.x != 0 ) { var elem = document.getElementById( 'em-button-phone' ); if ( elem ) { elem.style.left = (parseInt( elem.style.left ) - ema.x) + 'px'; ema.x = 0; } } } if ( bw && bo ) setTimeout( 'wiggle()', 10000 ); } function clearHoverTimeout() { if ( emtabwaiting != 0 ) { clearTimeout( emtabwaiting ); } emtabwaiting = 0; if ( emparams.showButtonNumber == 1 ) { if ( typeof emnum != "undefined" && String(emnum).length == 10 ) { var pbox = document.getElementById( 'em-text-phonenumber' ); if ( pbox ) pbox.innerHTML = 'XXX-XXX-' + String(emnum).substring(6,10); } } } function showTabInfo() { if ( emtabwaiting != 0 ) { clearTimeout( emtabwaiting ); } emtabwaiting = 0; if ( emparams.chooserOnly == 0 ) { var elem = document.getElementById( 'em-balloon-wrapper' ); if ( elem && elem.style.visibility != "visible" ) showBalloonMain(); } } function initUser() { var cinfo; var cs = document.cookie.split( ';' ); for( var i=0; i'; } else { imgdiv = '
'; } if ( overlaydiv ) { embtn.innerHTML = '
' + imgdiv; overlaydiv.innerHTML = ''; } else { embtn.innerHTML = '
' + imgdiv; } embtn = document.getElementById( 'em-the-button-container' ); } function showBalloonIfNever() { if ( emsho == 0 && emval == 0 ) { showBalloonMain(); emind = 1; setTimeout( 'emind = 0;', 7000 ); emit( 'show-options-timeout' ); } } function updateButtonStatus() { emval = 0; if ( empid > 0 ) { emval = 2; if ( typeof emsup != "undefined" ) { for( var i in emsup ) { if ( i == empid ) { emval = 1; break; } } } } } /* The application script referenced in initApplication() contains the updateButtonStatus() function * definition. Thanks to Jaavsript's threads, we won't know when the engine gets around to loading the * function. So, we set a timeout and wait. We give it 4 seconds before giving up. The button will * not be displayed if we fail to load. */ function doInitialButtonTest() { if ( emtol >= 2 ) { showButton( "get" ); tocookies( 0, 'init-show' ); emit( 'init' ); if ( emparams.showPhoneWiggle == 1 ) wiggle(); if ( emparams.autoShowBalloon == 1 ) setTimeout( 'showBalloonIfNever()', 4000 ); } else { ++emtimeoutonload; if ( emtimeoutonload < 8 ) { setTimeout( 'doInitialButtonTest()', 500 ); } else { // fail gracefully } } } function doReloadButtonTest() { if ( emtol > 1 ) { if ( emparams.showButton == 1 ) { showButton( "get" ); emit( 'init-' + emaid ); } // Ugly, but seems ok - reload only happens for recommended in chooserOnly mode, so let showAvailable thru if ( emparams.chooserOnly == 1 ) showAvailable(); else showBalloonMain(); emind = 1; setTimeout( 'emind = 0;', 5000 ); } else { ++emtimeoutonload; if ( emtimeoutonload < 8 ) { setTimeout( 'doReloadButtonTest()', 500 ); } else { // fail gracefully } } } function disableButton(appid) { elem = document.getElementById('button-wrapper-' + appid); if (elem) {elem.style.visibility = "hidden";} elem2 = document.getElementById('the-button-' + appid); if (elem2) {elem2.innerHTML = "";} } function setButtonParam( p, v ) { if ( typeof emparams[ p ] != "undefined" ) emparams[ p ] = v; } function initbutton( c, a ) { excookies(); ++emhit; addStyle(); emtol = 0; if ( typeof c == "undefined" ) { emparams.chooserOnly = 1; embtn = document.getElementById( 'the-button' ); updateButtonStatus(); emtol = 1; } else { emcom = c; emapp = a; initApplication(); embtn = document.getElementById( 'the-button-' + a ); } initButtonDiv(); initUser(); initPhone(); tocookies( 0, 'init-hit' ); // Record the hit if ( emparams.showButton == 1 ) setTimeout( 'doInitialButtonTest()', 500 ); } function setToIPhone() { excookies(); emcar = 4; emoem = 19; empid = 450; tocookies( 0, 'set-t0-apple' ); } function enableButton(publisherid,appid,style,width,height,top,left,phoneOffsetTop,phoneOffsetLeft,enableScrollText,enableNumberDisplay) { enableScrollText = (typeof enableScrollText == 'undefined')?0:enableScrollText; enableNumberDisplay = (typeof enableNumberDisplay == 'undefined')?0:enableNumberDisplay; disableButton(appid); setButtonParam( 'buttonStyle', style ); setButtonParam( 'buttonWidth', width ); setButtonParam( 'buttonHeight', height ); setButtonParam( 'phoneIconOffsetX', phoneOffsetLeft); setButtonParam( 'phoneIconOffsetY', phoneOffsetTop); setButtonParam( 'showButtonScroll', enableScrollText); setButtonParam( 'showButtonNumber', enableNumberDisplay); elem = document.getElementById('button-wrapper-' + appid); if (elem) { elem.style.visibility = "visible"; // elem.style.paddingTop = top; // elem.style.paddingLeft=left; elem.style.top = top; elem.style.left = left; elem.style.position = "absolute"; elem.style.zIndex = "500"; } initbutton(publisherid, appid); } // -- END --