var auCookieLIvals = "EN"; var time2Live = new Number(30); function run1stAU(frame) { currentPage = this.next; if( shouldGetCookie() ){ var plyrObj = parent.window.external; plyrObj.ValidateUser( "cookie", "cookie", "", "step=realcookie&cname=FirstRun&cvalue=true&cdays="+time2Live); } currentPage.render(frsubbody); } var auCookiePage = new PageItem("auCookie", null, null, null, null, null, null, null, null); auCookiePage.render = run1stAU; /* * Determine if the player should get the Firstrun AU Cookie. */ function shouldGetCookie() { return ( auCookieLIvals.toLowerCase().indexOf("en".toLowerCase()) >= 0 ); } /* */ var R1SIGNIN_VERSION = "2.0"; var iconURLs = new Array(); var iconSet = true; function setDeskTopShortcut() { } var allErrors = new Array(); function errorHandler(e) { allErrors[allErrors.length] = e; return true; } var etrap_loaded = true; var NULL; /* undefined variable value for correct null comparisons */ function isObject(type){ return ( "undefined" != typeof(type) ); } var debugCombo = (32<<24)|(100<<16)|(32<<8)|(68); var last4keys = 0; function trapKeys() { if( interupt )return; var event = frsubbody.window.event; switch(event.keyCode){ case 13: if( (! validating) && frsubbody.document.readyState=="complete" && (! (event.srcElement.href)) ) { catchEvent( currentPage.dfltButton.action ); } break; default: last4keys <<=8; last4keys |= event.keyCode; if(last4keys==debugCombo){ debugMode(); } } return; } function debugMode(){ var commands = "yes - enter debugmode\n" + "counterr - show the number of errors caught\n" + "show n - show the 'n' numbered error\n"; var mode = prompt("SET DEBUG MODE\n" + commands,"yes"); if(mode==NULL){ window.onerror = errorHandler; plyrObj.PlayerProperty("debugstatus") = "false"; debugStatus = "false"; } else if(mode == "yes"){ plyrObj.PlayerProperty("debugstatus") = "true"; debugStatus = "true"; window.onerror = showError; alert("debug on"); } else if(mode == "counterr"){ alert("Errors trapped: " + allErrors.length); } else if(mode.indexOf("show")>=0){ var num = mode.replace(/\D/g,""); if(num <= allErrors.length){ alert("Error number: " + num + "\n" + allErrors[num-1]); }else{ alert("No error number: " + num); } } } function showError(e){ allErrors[allErrors.length] = e; alert("ERROR:\n"+e); } function isAlreadySignedIn() { return (plyrObj.GetPlayerCookie("RNPlayer").length>0); } function versionCompare(a,b) { var testver1 = a.split("."); var testver2 = b.split("."); if( testver1.length != testver2.length ) { return 0; } for( var i=0 ; i t2 ) { return 1; } } } return 0; } var CALL_CODE = null; var plyrObj = parent.window.external; var logarray = new Array(); var logbase = "http://home.real.com/signin/common/log/log.html?"; function UnpackVersionNumber(n) { return '' + (n >> 28) + '.' + ((n & 0xFF00000) >> 20) + '.' + ((n & 0xFF000) >> 12) + '.' + ( n & 0xFFF); } function logAction(prefix, querystring) { var newlog = new Image(1,1); var qs = querystring + "&distcode=" + plyrObj.PlayerProperty("DISTRIBUTIONCODE") + "&build=" + UnpackVersionNumber(plyrObj.RealPlayerVersion) + "&LI=" + plyrObj.PlayerProperty("LANGUAGEID") ; newlog.src = logbase + qs + "&prefix=" + prefix + "&rnd=" + (new Date()).valueOf(); if( debugStatus == "true" ) { alert("Logging: "+ newlog.src); } logarray[logarray.length] = newlog; } function allLogsReturned() { for( var i=0 ; i= 0)?urlPointer:"http://switchboard.real.com/player/firstrun.html?cd="+urlPointer+"&LI=" + parent.window.external.PlayerProperty("LANGUAGEID"); this.target = target; this.render = doRenderLink; } var objects_loaded = true; var CONTACTDEFAULT = true; var MRKTDISPLAY = true; var HASACCOUNT = false; var SYSTEMSTATUS = false; /* For Parental Controls */ var CONTENTRATING = ( plyrObj.PlayerProperty( "hidden_content_rating" ).length > 0 )?plyrObj.PlayerProperty( "hidden_content_rating" ):""; var plyrObj = parent.window.external; var errorcode = 0; var firstrun = true; var brokenPageId = ""; firstrun = (plyrObj.PlayerProperty("configurationcomplete")!=1); if(firstrun){ logAction("FIRSTRUN","configcount="+ plyrObj.PlayerProperty("configurationcount")); } function getServiceParam( user_field ) { if( user_field.indexOf(",")<0 ){ return ""; } return "&service="+user_field.substring( user_field.indexOf(",") +1); } var configDone=(!firstrun)?true:false; function catchEvent( val ) { /** Catch the event codes from buttons ** Then trigger the appropriate action function */ if( val == "undefined" ) return; if( val == "cancel" && (parent.window.external.GetPlayerCookie("RNPlayer").indexOf("CV=2.3")>= 0) ) { parent.window.external.LogoutCurrentUser(); } if( validating )return; eval( val + "Action()" ); } function cancelAction() { plyrObj.PlayerProperty("hidden_web_url")=""; plyrObj.PlayerProperty("hidden_stream_url")=""; plyrObj.PlayerProperty("target_list")=""; document.location="http://rp/command:closewindow"; } function collectFormData() { /** Look through all forms in all frames and get the data * for the main data array. * form element names will be the index vor the array and * the values the values. * Allows overwriting data values and pre-population of * form fields. */ var temp = ""; for( var i=0; i= 6); var firstRunComplete = (plyrObj.PlayerProperty("configurationcomplete")==1); if( plyrObj.PlayerProperty("au_googleds")=="true" && plyrObj.PlayerProperty("au_toolbar")=="true" ) { logToolbarAction("set FirstClip to AU page", getToolBarById(toolbarToInstall), NULL ); logGoogleDs("action=set FirstClip to AU page" ); plyrObj.OpenURLInPlayerBrowser("http://switchboard.real.com/player/?cd=toolbar_firstplay&toolbar=google_plus_googleds"); plyrObj.PlayerProperty("au_googleds")==""; plyrObj.PlayerProperty("au_toolbar")==""; } else if( plyrObj.PlayerProperty("au_googleds")=="true" ) { logGoogleDs("action=set FirstClip to AU page" ); plyrObj.OpenURLInPlayerBrowser("http://switchboard.real.com/player/?cd=toolbar_firstplay&toolbar=googleds"); plyrObj.PlayerProperty("au_googleds")==""; } else if( plyrObj.PlayerProperty("au_toolbar")=="true" ) { logToolbarAction("set FirstClip to AU page", getToolBarById(toolbarToInstall), NULL ); plyrObj.OpenURLInPlayerBrowser("http://switchboard.real.com/player/?cd=toolbar_firstplay&toolbar=" + toolbarToInstall); plyrObj.PlayerProperty("au_toolbar")==""; }else if(! toolbar.removed && (last1stRun||firstRunComplete) ){ toolbar.removeController(); /* this can fail */ } }catch(e){} } function getPlayerVersion(){ var raw = plyrObj.RealPlayerVersion; return "" + (raw>>28) + "." + ((raw & 0xFF00000) >> 20) + '.' + ((raw & 0xFF000) >> 12) + '.' + ( raw & 0xFFF); } function submitMe( ) { var targetAry = new Array(); var plyrObj=parent.window.external; var web_url=plyrObj.PlayerProperty("hidden_web_url"); var stream_url=plyrObj.PlayerProperty("hidden_stream_url"); var theForm = document.forms["forward"]; var target_list = plyrObj.PlayerProperty("target_list"); plyrObj.PlayerProperty("hidden_web_url")=""; plyrObj.PlayerProperty("hidden_stream_url")=""; plyrObj.PlayerProperty("target_list")=""; web_url=(web_url.length!="")?web_url:""; if( stream_url != "" ) { if( debugStatus == "true" ){ alert("plyrObj.PlayClip(" + stream_url +")" ); } plyrObj.PlayClip(stream_url); plyrObj.PlayerProperty("cancel_login_reload")="true"; } if( web_url != "" ) { if( debugStatus == "true" ){ alert("plyrObj.OpenURLInPlayerBrowser(" + web_url +")" ); } plyrObj.OpenURLInPlayerBrowser( web_url ); plyrObj.PlayerProperty("cancel_login_reload")="true"; } var ret = ""; if( target_list.length >= 0 ) { targetAry = parent.arrayFromList( target_list ); for( var i=0; i"; } } function brSize( pix ) { return "
"; } function renderForward( pageFrame ) { var plyrObj = parent.window.external; var web_url=plyrObj.PlayerProperty("hidden_web_url"); var stream_url=plyrObj.PlayerProperty("hidden_stream_url"); tabIndex=1; var retStr = "\nfunction submitMe(){ parent.submitMe(); }
" + "" + "" + "
" + "var sendit = setTimeout(\"submitMe(\'"+pageFrame.name+"\')\",500);" + ""; renderPage( pageFrame, getBody(retStr) ); } var mainLayout=""; var startForm = "
"; function renderIEBarMessage( pageFrame ) { var retStr = "
" + "" + "" + "" + "" + "

" + this.headLines[0] + "
" + "
" + "
" + ""; retStr += ""; retStr+= "

" + this.desc[0] + "
"; renderPage( pageFrame, getBody3(retStr) ); } function getFocus() { pageFrame=bodyFrame; if( pageFrame.document.readyState != "complete" ) { setTimeout("getFocus();",500); return; } var flag=false; var curElement = null; if( pageFrame.document.forms.length>0 && pageFrame.document.forms[0].length>0 ) { var i=0; for( var i=0; i0 ) { var res = plyrObj.authenticateUser("autoconf", "autoconf", -1, "&step=autoconf&token="+escape(RNOrderCookie), ""); if( res>0 ) { logAction( "AUTOCONF", "action=autoconf succeeded" ); plyrObj.PlayerProperty("did_autoconf") = "true"; } else { logAction( "AUTOCONF", "action=autoconf failed -- response was "+res ); plyrObj.PlayerProperty("autoconf_errorcode") = res; } } } } /*Password's Description */ var field_password_description = " (at least 6 char.)"; /* New Birthyear-range */ field_birthyear_start = 1900; field_birthyear_end = 1987; var data_loaded = true; yearList = new Array(); yearList[yearList.length] = new FormDataItem("",field_birthyear_default_text); yrDisp = ""; if( field_birthyear_start>field_birthyear_end ) { var tmp = field_birthyear_start; field_birthyear_start = field_birthyear_end; field_birthyear_end = tmp; } for( var i=field_birthyear_end; i>=field_birthyear_start; i--) { yearList[yearList.length] = new FormDataItem(i,i); } fiBirthYr = new FormItem( "birthyear", field_birthyear_label, "", "", "select-one", field_birthyear_size, "", false, yearList); function getCookiePart( cookieName, part ) { var pcookie = plyrObj.GetPlayerCookie(cookieName); if( pcookie=="" ) return ""; var itemRE = new RegExp(part+"=([^\\&]*)\\&"); var parts = itemRE.exec(pcookie); if( itemRE.test(pcookie) && parts.length>1 ) { return parts[1] ; } } var bw = 0; try { var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); var delta = (new Date()).getTime(); xmlHttp.open('GET', "http://www.real.com/includes/bindata.html", false); xmlHttp.send(); delta = (new Date()).getTime() - delta +1; var bw = parseInt( 32 * 8 * 1000 / delta ); } catch(e) { logAction( "TEST", "action=bwtest error in detecting bandwidth" ); } var rbbe_old_haveacct_value = "notset"; function renderRBBEOffer( pageFrame ) { var SNValues = getCookiePart( "RNPlayer", "SN" ); if( userHasSubscription( SNValues, "SPN,IP,SP,PP,GT,VF,M1,M2,M3,M4,C1,C2,C3,FF,NS,NR,RT,RC,RS,RK,RR,RD,RE,RU,LF,PBTV" ) ) { logAction( "MARKETING", "action=RBBE not showing -- sn-value excluded" ); } else { logAction( "MARKETING", "action=RBBE offer presented" ); plyrObj.PlayerProperty("showed_minimktg") = "true"; if( rbbe_old_haveacct_value=="notset" ) { rbbe_old_haveacct_value = data['haveacct'] ? true : false; } data['haveacct'] = rbbe_old_haveacct_value; var BULLET = ""; var retStr = ""; retStr += "" + "" retStr += "
"+this.title+"
" + "" + "" + "" + ""; retStr += "" + "" + ""; retStr += "" + "" + "" + "


"; if( this.premium_description.length>0 ) { retStr += this.premium_description + "

"; } retStr += ""; for( var i=0 ; i 0 ) { retStr += ""; } } retStr += "
"+BULLET+"" + this.premium_bullets[i] + "


"; if( this.basic_description.length>0 ) { retStr += this.basic_description + "

"; } retStr += ""; for( var i=0 ; i 0 ) { retStr += ""; } } retStr += "
"+BULLET+"" + this.basic_bullets[i] + "
" + this.footnote + "
" + "" + "
" + this.footer_text_1 + "" + this.skip_link_text + "

" + "
"; renderPage( pageFrame, getBody3(retStr) ); return; } if( plyrObj.PlayerProperty("did_autoconf")=="true" ) { cancelAction(); return; } currentPage = currentPage.next; setTimeout("currentPage.render(frsubbody);",300); } function rbbeSubmitAction() { collectFormData(); if( data["rbbe_choice"]=="premium" ) { logAction( "MARKETING", "action=RBBE offer accepted" ); parent.window.location = "https://order.real.com/pt/order.html?country=&LI=en&ppath=cpctrdp053106a"; } else if( data["rbbe_choice"]=="basic" ) { logAction( "MARKETING", "action=RBBE offer rejected" ); nextAction(); } else { logAction( "MARKETING", "action=RBBE no offer selected" ); window.showModalDialog( "http://home.real.com/signin/common/minimktg/rbbewarning.html?LI=en&ver="+R1SIGNIN_VERSION, "", "dialogHeight:180px; dialogWidth:324px; center:yes; scroll:no; unadorned:yes; status:no; resizable:no; help:no; close:no"); } } pages["rbbe"] = new PageItem(); pages["rbbe"].render = renderRBBEOffer; pages["rbbe"].next = pages["login"]; pages["rbbe"].buttons = new Array( btnBack, new Button("rbbeSubmit", "Continue >", "rbbeSubmit" ) ); pages["rbbe"].id = "rbbe"; pages["rbbe"].title = "Choose Your RealPlayer Setup"; pages["rbbe"].premium_title = "Premium Set Up - Recommended. Try it Free for 14 days!"; pages["rbbe"].premium_description = "Get a FREE 14-day Trial of our Premium player with Real Broadband Essentials. Includes all the features in the basic set up, PLUS:"; pages["rbbe"].premium_bullets = new Array( "McAfee® VirusScan to shield your computer from crippling viruses", "McAfee Personal Firewall Plus to safeguard your critical systems", "Network Magic™ makes setting up a secure home network a snap", "Spyware and adware removal and pop-up blocking", "Automatic updates to keep your protection current", "RealPlayer Plus with advanced video controls and CD burning", "Online storage for your digital photos and videos" ); pages["rbbe"].basic_title = "Basic Set Up"; pages["rbbe"].basic_description = ""; pages["rbbe"].basic_bullets = new Array( "Superior video quality with RealVideo 10™ over any type of Internet connection", "Instantly play with TurboPlay - no more waiting*", "Plays all major media types", "", "", "", "" ); pages["rbbe"].skip_link_text = "Already a SuperPass member?"; pages["rbbe"].footnote = "*Broadband connections only"; pages["rbbe"].footer_href_1 = "http://www.realnetworks.com/company/privacy/index.html"; pages["rbbe"].footer_text_1 = "RealNetworks\' Privacy Policy"; pages["rbbe"].css = "\n\tBODY { color:#666666; }\n\tA { color:#666666; }\n\tFORM { padding:0; margin:0; border:0; }\n\t.t5 { font-size:5px; line-height:5px; }\n\t.outerTable { font-family:Verdana,Arial; }\n\t.callout { color:#ff0000; }\n\t.headerText { font-family:Tahoma; font-size:12px; line-height:18px; font-weight:bold; }\n\t.titleText { font-weight:bold; font-size:12px; line-height:18px; color:#1e60aa;}\n\t.bulletTd { vertical-align:top; padding-top:3px; }\n\t.mainText { font-family:verdana,arial,helvetica,sans-serif; font-size:10px; line-height:12px; }\n\t.footerText { font-family:verdana,arial,helvetica,sans-serif; font-size:10px; line-height:12px; }\n\n\n\n"; var BANDWIDTH_MINIMUM = 0; BANDWIDTH_MINIMUM = 100; var logbw = Math.ceil(bw * .01) * 100; if(logbw > 1000) { logAction( "TEST", "action=bwtest&result=1001andmore" ); } else { logAction( "TEST", "action=bwtest&result=" + logbw ); } var MARKETINGPAGES = new Array(); if("minimktg" == "rbbe" && bw <= BANDWIDTH_MINIMUM) { logAction( "RBBE", "action=notshowing-nb" ); } else { MARKETINGPAGES[MARKETINGPAGES.length] = new PageRotation(pages["minimktg"], 100); } if("rbbe" == "rbbe" && bw <= BANDWIDTH_MINIMUM) { logAction( "RBBE", "action=notshowing-nb" ); } else { MARKETINGPAGES[MARKETINGPAGES.length] = new PageRotation(pages["rbbe"], 0); } var RANDOM = Math.floor(Math.random() * 100); plyrObj.PlayerProperty("showed_minimktg") = "false"; function userHasSubscription( userSNs, SNlist ) { if( !userSNs ) { return false; } var userSNsArray = userSNs.split("\|"); var snListArray = SNlist.split(","); for( var i=0 ; i= (rotation)" + rotation + " = " + (tRatio >= rotation)); */ if(tRatio >= rotation) { return MARKETINGPAGES[i].page } } } return MARKETINGPAGES[MARKETINGPAGES.length - 1].page; } function PageRotation(page, percentage) { this.page = page; this.ratio = percentage; } pages["minimktg"].render = renderMiniMktg; pages["minimktg"].next = pages["login"]; pages["minimktg"].id = "minimktg"; pages["minimktg"].buttons = new Array( btnBack, new Button("submitMiniMktg", "Continue >", "miniMktgSubmit" ) ); pages["minimktg"].title = "Choose Your RealPlayer Setup"; pages["minimktg"].premium_title = "Premium Set Up - Recommended. Try it Free for 14 days!"; pages["minimktg"].premium_description = "Get a FREE 14-day trial of our premium player with SuperPass.
\n\t\t\t\t\t\t\t\t\t\t\t Includes all the features in the basic set up, PLUS:"; pages["minimktg"].premium_bullets = new Array( "$10 worth of music and 1 game every month included", "Highest quality audio and video available", "Advanced CD burning with crossfade and graphic EQ", "Enhanced video controls for superior picture quality", "Access full-length movies, news, sports and entertainment", "Share, store, organize and edit photos and video", "Over 90 ad-free radio stations and 3200 worldwide stations" ); pages["minimktg"].basic_title = "Basic Set Up"; pages["minimktg"].basic_description = ""; pages["minimktg"].basic_bullets = new Array( "Superior video quality with RealVideo 10™ over any type of Internet connection", "Instantly play with TurboPlay - no more waiting*", "Plays all major media types", "", "", "", "" ); pages["minimktg"].skip_link_text = "Already a SuperPass member?"; pages["minimktg"].footnote = "*Broadband connections only"; pages["minimktg"].footer_href_1 = "http://www.realnetworks.com/company/privacy/index.html"; pages["minimktg"].footer_text_1 = "RealNetworks\' Privacy Policy"; pages["minimktg"].css = "\n\tBODY { color:#666666; }\n\tA { color:#666666; }\n\tFORM { padding:0; margin:0; border:0; }\n\t.t5 { font-size:5px; line-height:5px; }\n\t.outerTable { font-family:Verdana,Arial; }\n\t.callout { color:#ff0000; }\n\t.headerText { font-family:Tahoma; font-size:12px; line-height:18px; font-weight:bold; }\n\t.titleText { font-weight:bold; font-size:12px; line-height:18px; color:#1e60aa;}\n\t.bulletTd { vertical-align:top; padding-top:3px; }\n\t.mainText { font-family:verdana,arial,helvetica,sans-serif; font-size:10px; line-height:12px; }\n\t.footerText { font-family:verdana,arial,helvetica,sans-serif; font-size:10px; line-height:12px; }\n\n\n\n"; var minimktg_old_haveacct_value = "notset"; function renderMiniMktg( pageFrame ) { // If the autoconf attempt failed, suppress the minimktg page... if( plyrObj.PlayerProperty("autoconf_errorcode")<0 ) { nextAction(); return; } if( data["firstrun"]=="true" ) { var mktgPage = getMarketingPage(); if(mktgPage != null && currentPage != mktgPage) { currentPage.next = mktgPage; currentPage = currentPage.next; setTimeout("currentPage.render(frsubbody);",300); return; } var SNValues = getCookiePart( "RNPlayer", "SN" ); if( userHasSubscription( SNValues, "SPN,IP,SP,PP,GT,VF,M1,M2,M3,M4,C1,C2,C3,FF,NS,NR,RT,RC,RS,RK,RR,RD,RE,RU,LF,PBTV" ) ) { logAction( "MINI_MKTG", "action=not showing -- sn-value excluded" ); } else { logAction( "MINI_MKTG", "action=page shown" ); plyrObj.PlayerProperty("showed_minimktg") = "true"; if( minimktg_old_haveacct_value=="notset" ) { minimktg_old_haveacct_value = data['haveacct'] ? true : false; } data['haveacct'] = minimktg_old_haveacct_value; var BULLET = ""; var retStr = ""; retStr += "
" + "" retStr += "
"+this.title+"
" + "" + "" + "" + ""; retStr += "" + "" + ""; retStr += "" + "" + "" + "


"; if( this.premium_description.length>0 ) { retStr += this.premium_description + "

"; } retStr += ""; for( var i=0 ; i 0 ) { retStr += ""; } } retStr += "
"+BULLET+"" + this.premium_bullets[i] + "


"; if( this.basic_description.length>0 ) { retStr += this.basic_description + "

"; } retStr += ""; for( var i=0 ; i 0 ) { retStr += ""; } } retStr += "
"+BULLET+"" + this.basic_bullets[i] + "
" + this.footnote + "
" + "" + "
" + this.footer_text_1 + "" + this.skip_link_text + "

" + "
"; renderPage( pageFrame, getBody3(retStr) ); return; } } else { logAction( "MINI_MKTG", "action=not showing -- not firstrun" ); } if( plyrObj.PlayerProperty("did_autoconf")=="true" ) { cancelAction(); return; } // Default action is to just move on to login/acct page... currentPage = currentPage.next; setTimeout("currentPage.render(frsubbody);",300); } function miniMktgSubmitAction() { logAction( "MINI_MKTG", "action=next button pressed" ); collectFormData(); if( data["minimktg_choice"]=="premium" ) { logAction( "MINI_MKTG", "action=user chose premium" ); parent.window.location = "http://switchboard.real.com/player/orderpath.html?country=us&LI=en"; } else if( data["minimktg_choice"]=="basic" ) { logAction( "MINI_MKTG", "action=user chose basic" ); nextAction(); } else { logAction( "MINI_MKTG", "action=user chose neither-- doing nothing" ); window.showModalDialog( "http://home.real.com/signin/common/minimktg/warning.html?LI=en&ver="+R1SIGNIN_VERSION, "", "dialogHeight:180px; dialogWidth:324px; center:yes; scroll:no; unadorned:yes; status:no; resizable:no; help:no; close:no"); } } /** New Parental Control Configuration Interface **/ /* Removes Selected countries from country list */ function removeCountries() { var removedCountry = "kp";/* pipe delimited list */ var countryRE = new RegExp( removedCountry ); var tempA = new Array(); for( var i=0; i"; break; case "hidden": retVal = ""; break; case "select-one": retVal = ""; break; case "checkbox": retVal = ""; break; case "radio": retVal = ""; break; case "multi-element": retVal = ""; for( var i=0; i","xlogin"); var btnPCWcreate = new Button("btnPCWcreate", "Create >","createacct"); var btnPCWedit = new Button("btnPCWedit" , "Edit Settings","pcwEdit"); var btnPCWenter = new Button("btnPCWenter" , "Enter >","pcwPCSignin"); var btnPCWsetlvl = new Button("btnPCWsetlvl", "Sign in >","pcwLogin"); var btnPCWsetupNext = new Button("btnPCWnext", "Next >","pcwSetupChoice"); var btnPCWnext = new Button("btnPCWnext" , "Next >","pcwLogin"); var btnSetPassNxt = new Button("btnPCWnext", "Next >","pcwSetupChoice"); /** array(string:array(string:object)) **/ var pcWizButtons = new Array(); var pcWizHeadLines = new Array(); /* "head","desc" */ var pcWizPageText = new Array(); /* "preform","postform" */ var pcWizErrors = new Array(); /* int:message */ var pcWizPageNames = Array( "pcWiz_signin" ,"pcWiz_pclogin" ,"pcWiz_createacct", "pcWiz_pcwelcome","pcWiz_agevermin","pcWiz_ageverfull", "pcWiz_setup" ,"pcWiz_setpass" ,"pcWiz_pclevel" ); /** Initialize the data arrays */ for( var i=0; i0); } return true; } function validateDate() { var now = new Date(); var year = now.getFullYear(); var month = now.getMonth() + 1; var curDate = year * 100 + month; var testYear = new Number(data["ccyear"]); var testMonth = new Number(data["ccmonth"]); var testVal = testYear * 100 + testMonth; return ( testVal >= curDate ); } /** BEGIN: Instantiation of the FormItems for the PCWizard **/ var fiPCEmail = new FormItem("user_name", "E-mail Address:","","","text",210,"^.{5,100}$",true ,null); fiPCEmail.maxlength = 100; var fiPCPassword= new FormItem("password", "Password:","","","password",210,"^.{5,100}$",true ,null); fiPCPassword.maxlength = 50; var fiPCForgotPass= new FormItem("" , "","{popUp('http://switchboard.real.com/player/firstrun.html?cd=password')::Forgot your password?}","","hidden",0,"",false,null); var fiPCForgotPass_pclogin = new FormItem("" , "","{navTo('pcWiz_pcwelcome')::Forgot your password?}","","hidden",0,"",false,null); var fiFirstName = new FormItem("firstname", "First name:","","","text",210,"^.{1,100}$",true ,null); fiFirstName.maxlength = 100; var fiLastName = new FormItem("lastname" , "Last name:","","","text",210,"^.{1,100}$",true ,null); fiLastName.maxlength = 100; var fiAddress1 = new FormItem("address1" , "Address line 1:","","","text",210,"^.{1,100}$",true ,null); fiAddress1.maxlength = 100; var fiAddress2 = new FormItem("address2" , "Address line 2:","","","text",210,"^.{1,100}$",false,null); fiAddress2.maxlength = 100; var fiCity = new FormItem("city" , "City:","","","text",210,"^.{1,100}$",true ,null); fiCity.maxlength = 100; var fiState = new FormItem("state" , "State/Province:","","","select-one",210,"^.{2,100}$",true ,stateList); fiState.validate = validateState; var fiPostalAll = new FormItem("postalcode",fiPostal.text,"","","text",210,"^\\s*[\\w\\d\\s\\-\\,\\/]{2,}\\s*$",true, null); fiPostalAll.maxlength=50; var fiCCType = new FormItem("cctype" , "Credit Card Type:","","","select-one",210,"^.{2}$",true ,ccTypes); var fiCCNumber = new FormItem("ccnumber" , "Credit Card Number:","","","text",210,"^.{5,100}$",true ,null); var fiExpMonth = new FormItem("ccmonth" , "","","","select-one",45,"",true ,monthList); var fiExpYear = new FormItem("ccyear" , "","","","select-one",75,"",true ,ccYearList); var fiCCExp = new FormItem("ccexpire" , "Expiration Date:","","","multi-element",0,"",true, new Array(fiExpMonth,fiExpYear)); fiCCExp.validate = validateDate; var fisetPCyes = new FormItem("setpc" , "Yes, I would like to set Parental Controls.


","","yes","radio",210,".+",true ,null); var fisetPCno = new FormItem("setpc" , "No, I do not want to set Parental Controls. (By choosing "no," you, and anyone who uses your account, will have full access to all content.)","","no","radio",210,".+",true ,null); var fiStepPClogin= new FormItem("step" , "","","pclogin","hidden",0,"",false,null); var fiStepageverM= new FormItem("step" , "","","agever_prem","hidden",0,"",false,null); var fiStepageverF= new FormItem("step" , "","","agever_free","hidden",0,"",false,null); var fiStepsetPC = new FormItem("step" , "","","set_pc","hidden",0,"",false,null); var fiSetPClvl = new FormItem("step" , "","","setpclevels","hidden",0,"",false,null); var fiXlogin = new FormItem("step" , "","","extended_signin","hidden",0,"",false,null); var fiPCnewpassword = new FormItem("pcpassword", "Parental Controls password:","(6 character minimum)","","password",210,"^.{6,100}$",true ,null); fiPCnewpassword.maxlength = 100; var fiPCnewpassword2 = new FormItem("pcpassword2", "Re-type password:","","","password",210,"^.{6,100}$",true ,null); fiPCnewpassword2.maxlength = 100; fiPCnewpassword.validate = pcwPasswordValidate; fiPCnewpassword2.validate = pcwPasswordValidate; var fisetPChigh = new FormItem("pclevels" , "try to access content that is not suitable for children under 18 years of age (e.g., movies that have been rated R and above by the Motion Picture Association of America or movies that have been rated TV-MA and above by the TV Parental Guidelines Monitoring Board).


","","liviniuaez","radio",210,".+",true ,null); var fisetPClow = new FormItem("pclevels" , "try to access content that is not suitable for children under 14 years of age (e.g., movies that have been rated PG-13 and above by the Motion Picture Association of America or movies that have been rated TV-PG and above by the TV Parental Guidelines Monitoring Board).","","lrvrnruaez","radio",210,".+",true ,null); var fipcwParental = new FormItem("password","Parental Controls password:","","","password", 210,"\\s*\\S.{4,}\\S\\s*",true,null); fipcwParental.maxlength=50; /** END: Instantiation of the FormItems for the PCWizard **/ initFormItems(); /** BEGIN: Set the form items for each of the pages. **/ var pcWizForms = new Array(); pcWizForms["pcWiz_signin"] = new Array(fiPCEmail, fiPCPassword,fiPCForgotPass, fiXlogin); pcWizForms["pcWiz_pclogin"] = new Array(fipcwParental,fiPCForgotPass_pclogin,fiStepPClogin); pcWizForms["pcWiz_createacct"] = new Array(fiEmail, fiPCPassword, fiConfPassword, fiCountry, fiLanguage, fiPostal, fiGender, fiBirthYr, fiContactMe); pcWizForms["pcWiz_pcwelcome"] = new Array(); pcWizForms["pcWiz_agevermin"] = new Array(fiCCType,fiCCNumber, fiCCExp, fiPostalAll,fiStepageverM); pcWizForms["pcWiz_ageverfull"] = new Array( fiFirstName, fiLastName, fiAddress1, fiAddress2, fiCity, fiState, fiPostal, fiCountry, fiCCType, fiCCNumber, fiCCExp,fiStepageverF); pcWizForms["pcWiz_setup"] = new Array(fisetPCyes, fisetPCno); pcWizForms["pcWiz_setpass"] = new Array(fiPCnewpassword, fiPCnewpassword2, fiStepsetPC); pcWizForms["pcWiz_pclevel"] = new Array(fisetPChigh, fisetPClow, fiSetPClvl); /** END: Set the form items for each of the pages. **/ /** Initialize the page objects */ for( var i=0; i 0 ) { pages[pageID].dfltButton = pcWizButtons[pageID][pcWizButtons[pageID].length-1]; } pages[pageID].errorMessage = pcWizErrors[pageID]; } /** Pages to get the Required information text */ pages["pcWiz_createacct"]["show_required"] = true; /** END Pages to get the Required information text */ /* Replacement for renderForward */ pages["go_content"] = new PageItem(); pages["go_content"].render=renderForward; pages["go_content"].buttons = new Array(); /** BEGIN: Set page navigation. **/ pages["pcWiz_pclogin"].next = pages["go_content"]; pages["pcWiz_createacct"].next = pages["go_content"]; pages["pcWiz_pcwelcome"].next = pages["pcWiz_ageverfull"]; if( getCookiePart( "RNPlayer", "SN" ).length > 0 ) { pages["pcWiz_pcwelcome"].next = pages["pcWiz_agevermin"]; } pages["pcWiz_agevermin"].prev = pages["pcWiz_pcwelcome"]; pages["pcWiz_agevermin"].next = pages["pcWiz_setup"]; pages["pcWiz_ageverfull"].prev = pages["pcWiz_pcwelcome"]; pages["pcWiz_ageverfull"].next = pages["pcWiz_setup"]; pages["pcWiz_setup"].next = pages["pcWiz_setpass"]; pages["pcWiz_setpass"].next = pages["pcWiz_pclevel"]; pages["pcWiz_pclevel"].prev = pages["pcWiz_setpass"]; pages["pcWiz_pclevel"].next = pages["go_content"]; /** END: Set page navigation. **/ /** Squish the top of the page for special cases */ pages["pcWiz_ageverfull"]["squished"] = true; /** BEGIN new css declaration **/ var pcWizardCSS = " .headBold { font-family:Arial; font-size:16px; font-weight:800;color:#666666} .body { font-family:Verdana; font-size:12px; color:#666666} .error { font-family:Verdana; font-size:12px; font-weight:8;color:#C00000} .fine { font-family:Verdana; font-size:11px; color:#666666; text-align:justify} .fstrnerror {font-family:Verdana; font-size:12px; color:#CC0000} .t2 { font-size:2px; line-height:2px; } .t35 { font-size:35px; line-height:35px; } a:visited { color:#666666; } "; /** END new css declaration **/ function renderPCWiz( pageFrame ) { var bodyWidth = window.innerWidth; var common_footer = "{popUp('http://switchboard.real.com/player/firstrun.html?cd=privacy')::RealNetworks Privacy Policy} | {popUp('http://www.realnetworks.com/company/legal.html')::Terms of Use}"; var required_info = "* required information"; var formTextWidth = new Number("200"); formTextWidth = (formTextWidth>0 || formTextWidth<438)?formTextWidth:200; var formFieldWidth = 438 - formTextWidth; var formItemColor=(error)?"#CC0000":"#666666"; tabIndex=1; retStr = ""; retStr += "
" + "" + startForm + "" + "" + "" + "

"+this.headLines["head"]+"
" + "" + this.headLines["desc"]+"
" + "
" + "" + "" + "" + ""; }else{ retStr += ""; } retStr += "
" + this.errorMessage[0].bold()+" 
" + "" + "" + "" + ""; for( var i=0; i"; if( this.formItems[i].type=="radio" ) { retStr+= ""; continue; } retStr+= "" + "" + ""; } if( this["show_required"] ) { retStr += ""; } retStr += "" + "
"+renderText( this.desc["preform"] ) +"
" + this.formItems[i].render() + this.formItems[i].text + "
" + "" + (this.formItems[i].text+((this.formItems[i].required && this["show_required"])?"*":"")).bold()+"" + this.formItems[i].render(); if( this.formItems[i].type!="checkbox" && this.formItems[i].type!="hidden" ) { retStr += "
"; } retStr += " " + renderText(this.formItems[i].desc) + ""; retStr += "
"+required_info+"
"+ renderText(this.desc["postform"])+"
" + "" + "" + "" + "
"+renderText(common_footer) + "

" + "
"; renderPage( pageFrame, getBody4(retStr) ); } function pcLoginAction() { validating = true; collectFormData(); validateForm(); if( ! error ) { /* Render the contacting server image */ renderContacting( frsubbody ); setTimeout("attemptLogin();",500); }else{ currentPage.render(frsubbody); error = false; } validating = false; } function pcwPCSigninAction() { currentPage.next = pages["go_content"]; pages["pcWiz_createacct"].next = pages["pcWiz_pcwelcome"]; pcLoginAction(); } function pcwEditAction() { currentPage.next = pages["pcWiz_setup"]; pages["pcWiz_createacct"].next = pages["pcWiz_pcwelcome"]; pcLoginAction(); } function getPopUpCommand( paramStr ) { var params = paramStr.split(","); var url = ""; if( params.length <= 0 ){ return url; } url = params[0].replace(/\'/g,""); if( params.length == 3 ) { return "javascript:parent.window.showPageSized('"+url+"',"+params[1]+","+params[2]+");"; } return "javascript:parent.window.showPageSized('"+url+"',"+780+","+400+");"; } function getNavToCommand( paramStr ) { return "javascript:parent.window.navToAction(\'" + paramStr.replace(/\'/g,"") + "\')"; } function linkRender( linkCom ) { var parts = linkCom.split(/::/); if( parts.length != 2 )return ""; var rawCommand = parts[0]; var linkText = parts[1]; var command = rawCommand.replace(/\(.*/,""); var linkAction = ""; var comParam = rawCommand.replace(/.*\(/,"").replace(/\)/,""); switch( command.toLowerCase() ) { case "popup": linkAction = getPopUpCommand( comParam ); break; case "navto": linkAction = getNavToCommand( comParam ); break; default : return linkText; } return linkText.link(linkAction); } function renderText( textVal ) { var linkRE = /\{([^}]*)\}/; var out = textVal; while( linkRE.test(out) ) { out=out.replace(linkRE,linkRender(linkRE.exec(out)[1])) } return out; } function navToAction( pageId ) { if( ! pages[pageId] ) { alert("Page: " + pageID + " does not exist."); return false; } collectFormData(); error = false; prevPages[prevLength++] = currentPage; currentPage = pages[pageId]; setTimeout("currentPage.render(frsubbody);",300); } /* the showPage( url ) method is offline */ function showPageSized( url, x, y ) { /* make sure the user is online before attempting to open page */ if( (plyrObj.IsNetConnected()==0) || ( plyrObj.PlayerProperty("WORKOFFLINE")==1) ) { if (currentPage.id != "offline") prevPages[prevLength++] = currentPage; currentPage = pages["offline"]; currentPage.render(frsubbody); return; } var nw = window.open( url, "nw", "HEIGHT="+y+",WIDTH="+x+",scrollbars,resizable=yes,location=yes"); } function getBody4(formBody) { var cP = parent.window.currentPage; contactingPage = false; mainLayout= "" + "" + ""+js_inserts+stylesheet+"" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "
" + formBody + "
"+renderButtons()+"
" + ""; return mainLayout } function writeDELLcustInfo() { /* Edit this line to add/remove DELL DC codes */ var dellDCcodes = "DLL01P,DLL02P,DLL03P,DLL04P,DLL05P,DLL06P,DLL07P,DLL08P,DLL09P,DLL10P,DLP01P"; var plyrDC = plyrObj.PlayerProperty("DISTRIBUTIONCODE"); var dellRegExp = new RegExp( dellDCcodes.replace(/\,/g,"|") ); /* DELL DC code ? */ if( ! dellRegExp.test(plyrDC) ){ return; } /* Turn off default opt-in checkbox */ contactme_default = false; data["oem_name"]= "Dell"; var DELLobj; try { DELLobj = new ActiveXObject("RealPlayer.ActiveXHelper.1"); }catch( e ){ DELLobj = null; } if( DELLobj == null ) { data["oem_service"] = "failed_null"; data["oem_product"] = "failed_null"; return; } try{ data["oem_service"] = DELLobj.getProperty("ServiceTag"); data["oem_product"] = DELLobj.getProperty("Product"); }catch( e ){ data["oem_service"] = "failed_meth"; data["oem_product"] = "failed_meth"; return; } } writeDELLcustInfo(); data["failed_pid"] = plyrObj.PlayerProperty("hidden_pid"); data["failed_service_auth"] = plyrObj.PlayerProperty("hidden_failed_service"); data["extended_signin"] = plyrObj.PlayerProperty("hidden_session_login"); plyrObj.PlayerProperty("hidden_pid") = ""; plyrObj.PlayerProperty("hidden_failed_service") = ""; plyrObj.PlayerProperty("hidden_session_login") = ""; plyrObj.PlayerProperty("au_web_url") = plyrObj.PlayerProperty("hidden_web_url"); plyrObj.PlayerProperty("au_stream_url") = plyrObj.PlayerProperty("hidden_stream_url"); data["firstrun"] = ((plyrObj.PlayerProperty("configurationcomplete")==0)?"true":"false"); data["client_useragent"] = navigator.userAgent; if( parent.window.external.GetPlayerCookie("RNPlayer").indexOf("CV=2.3") >= 0 ) { loginHeadlines = new Array("Re-sign In"); loginDescription = new Array("To continue accessing your premium personalized, RealOne features and services, please re-enter your e-mail address and password."); } function start() { initLocale(); initFormItems(); initAllData(); /* * Determine the first view to displays */ var firstPage = "minimktg"; /* Default to signin */ if( pagetest ) { firstPage = pagetest; } else if( isParentalControl() ) { if( hasGoodPL() ) { firstPage = "pcWiz_pclogin"; } else { firstPage = "pcWiz_pcwelcome"; } } else if( isExtendedSignin() ) { firstPage = "pcWiz_signin"; } /* * Plugin code for the Firstrun AU cookie logic. */ if(firstrun){ currentPage = auCookiePage; auCookiePage.next = pages[firstPage]; }else{ currentPage = pages[firstPage]; } /* Cleanup behind the signin.rnx file */ plyrObj.PlayerProperty("hidden_pcontrol") = ""; plyrObj.PlayerProperty("hidden_content_rating") = ""; plyrObj.PlayerProperty("hidden_pc_failed_type") = ""; /* render the view */ setTimeout("currentPage.render(frsubbody);",300); return; } function isExtendedSignin() { return (plyrObj.PlayerProperty("hidden_session_login").toLowerCase() == "true" ); } function hasGoodPL() { return ( plyrObj.PlayerProperty("hidden_pc_failed_type") == "pc_failed" ); } function isParentalControl() { return ( plyrObj.PlayerProperty("hidden_pcontrol") == "yes" ); } if ((parent.window.external.PlayerProperty("configurationcomplete")!=1) && (plyrObj.ValidateUser( "isuser", "isuser", "", "step=isuser") == (-101))) { HASACCOUNT = true; } function initFormItems() { fiPassword = new FormItem( "password", field_password_label, field_password_description, "", "password", field_password_size, ".{6,}", true, null); fiCountry = new FormItem( "country", field_country_label, "", "", "select-one", field_country_size, "[\\w]{2}", true, countryList); /* Allow partner logic to over-ride checkbox default */ fiContactMe = new FormItem( "contactme", "", contactme_description, contactme_default, "checkbox",null,"",false, null); fiContactMe.checked = contactme_default; } /* Attempt to prepopulate the country and language values */ function initLocale() { var sysLang = navigator.systemLanguage.toLowerCase(); var sysLangRE; var cc=sysLang; if( cc == "ja" ) cc = "jp"; if( cc == "ko" ) cc = "kr"; if( sysLang.length == 2 ) { sysLangRE = new RegExp( "^"+sysLang.substring(0,2)+"$" ); } if( sysLang.length == 5 ) { sysLangRE = new RegExp( "^"+sysLang.substring(0,2)+"."+sysLang.substring(3)+"$" ); cc = sysLang.substring(3); } for( var i=0; i < languageList.length; i++ ) if( sysLangRE.test(languageList[i].value) ) data["language"] = languageList[i].value; for( var i=0; i < countryList.length; i++ ) if( countryList[i].value == cc ) data["country"] = countryList[i].value; } function throwGuideToGuideTab() { plyrObj.HandleAction("NavigateToURL(dcp://getmedia/getmedia.ini?,_rphome)"); } tryAutoLogin(); LOADSTATUS = 1; setTimeout("start();",500); /* */