var DoOnLoad = false; var wResize = false; var base= "" var nrm = new Array(); var omo = new Array(); //Images var stuff = new Array(); function winResize() { window.onresize = resizeDiv; } // preload images if (document.images) { for (i=0;i=5) ? true : false; } return br } function OnLoadSpecs() { var cnt = 1; while (getCell('q'+ cnt + 'text')) { ToggleSpecs('q'+ cnt); cnt++; } } var itemid=0; var itemtimeout; function ToggleAllSpecs(items, action) { var browserName=navigator.appName; if (browserName=="Netscape"){} itemid=itemid+1; var oImage = getCell('q'+itemid+'image'); var oText = getCell('q'+itemid+'text'); var oGutter = getCell('q'+itemid+'gutter'); var oContent = getCell('q'+itemid+'content'); var oState = getCell('showstate'); var oStateall = getCell('showstateall'); if (action == 'closeall') { //Show (expand) if (oImage) oImage.src = '/res/motorola/messages/faqPlus.gif'; if (oText) oText.style.color = '#000000'; if (oGutter) oGutter.style.display = ''; if (oContent) oContent.style.display = 'none'; } else if (action == 'openall') { //Hide (collapse) if (oImage) oImage.src = '/res/motorola/messages/faqMinus.gif'; if (oText) oText.style.color = '#FF9900'; if (oGutter) oGutter.style.display = 'none'; if (oContent) oContent.style.display = ''; } if (itemid!=items) { itemtimeout=setTimeout("ToggleAllSpecs("+items+",'"+action+"')",0); } else { clearTimeout(itemtimeout); itemid=0; if (oContent.style.display != 'none') { if (oState) oState.style.display = 'none'; if (oStateall) oStateall.style.display = 'block'; }else{ if (oState) oState.style.display = 'block'; if (oStateall) oStateall.style.display = 'none'; } } } function ToggleSpecs(id) { var oImage = getCell(id + 'image'); var oText = getCell(id + 'text'); var oGutter = getCell(id + 'gutter'); var oContent = getCell(id + 'content'); if (oContent.style.display != 'none') { //Show (expand) if (oImage) oImage.src = '/res/motorola/messages/faqPlus.gif'; if (oText) oText.style.color = '#000000'; if (oGutter) oGutter.style.display = ''; if (oContent) oContent.style.display = 'none'; }else{ //Hide (collapse) if (oImage) oImage.src = '/res/motorola/messages/faqMinus.gif'; if (oText) oText.style.color = '#FF9900'; if (oGutter) oGutter.style.display = 'none'; if (oContent) oContent.style.display = ''; } } function contextPopup(url) { var wincontext = window.open(url, 'wincontext', 'width=357,height=425,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,menubar=no,status=yes'); wincontext.focus(); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= 4) { win.window.focus(); } } function cmsOpenPopup (href, name, width, height, x, y, menu, status, scroll, loc, resize, title, toolbar){ var attributes = ''; if (width.length > 0) attributes = attributes + ',width=' + width; if (height.length > 0) attributes = attributes + ',height=' + height; if (x.length > 0) attributes = attributes + ',screenx=' + x; if (x.length > 0) attributes = attributes + ',left=' + x; if (y.length > 0) attributes = attributes + ',screeny=' + y; if (y.length > 0) attributes = attributes + ',top=' + y; attributes = attributes + ',menubar=' + (menu==1?'yes':'no'); attributes = attributes + ',status=' + (status==1?'yes':'no'); attributes = attributes + ',scrollbars=' + (scroll==1?'yes':'no'); attributes = attributes + ',location=' + (loc==1?'yes':'no'); attributes = attributes + ',titlebar=' + (title==1?'yes':'no'); attributes = attributes + ',toolbar=' + (toolbar==1?'yes':'no'); attributes = attributes + ',resizable=' + (resize==1?'yes':'no'); attributes = attributes.substring(1,attributes.length); var cmsPopup = window.open(href, name, attributes) } //WAP pop up window function wapPopUp() { wapWindow = window.open('http://secure.mouse2mobile.com/clients/hellomoto/launch.asp?sharedSecret=dfjksntr89we', 'wap', 'resizable=yes,width=390,innerwidth=390,height=520,innerheight=520'); } //Java Session pop up window function javaPopUp() { javaWindow = window.open('https://secure.mouse2mobile.com/clients/motography/default.asp', 'java', 'resizable=yes,width=390,innerwidth=390,height=520,innerheight=520'); } //function to close a window function closeWin(){ aWindow = window.close() } //function to open popup window for country purchase function openLargePopupWin(URL) { aWindow = window.open(URL,"largepopup","toolbar=no,width=750,height=620,status=no,scrollbars=auto,resizable=no,menubar=no"); } function openInfoWin(URL) { aWindow = window.open(URL,"thewindow","toolbar=no,width=450,height=320,status=no,scrollbars=auto,resizable=no,menubar=no"); } function openWin_shop(url) { obj=open(url, "shop_popup", "width=450,height=314,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no") obj.window.focus() } //function to open popup window for Right Now Integration function openLargePopupWin2(URL) { aWindow = window.open(URL,"largepopup","toolbar=no,width=750,height=580,status=no,scrollbars=yes,resizable=yes,menubar=no"); } //preload images; var img_lib=new Object(); var nav_base='images/static/tabs/'; function NewcountryRoll(theCountry) { ChangeImg("map_main", theCountry) } function NewcountrySel(theCountry) { } function NewcountryOff() { ChangeImg("map_main", "world") } function NewAddNavImg(img_name) { img_lib[img_name+'_over']=new Image(); img_lib[img_name+'_over'].src=nav_base+img_name+'_over.gif'; img_lib[img_name+'_off']=new Image(); img_lib[img_name+'_off'].src=nav_base+img_name+'_off.gif'; } function NewAddImg(id, src) { img_lib[id]=new Image(); img_lib[id].src=src; } // nav rollover functions; function NewNavROver(id) { var img=(document.images)?document.images[id]: ((document.all)?document.all[id]:((document.getElementById)?document.getElementByID(id):0)); if (img) img.src=img_lib[id+'_over'].src; } function NewNavROut(id) { var img=(document.images)?document.images[id]: ((document.all)?document.all[id]:((document.getElementById)?document.getElementByID(id):0)); if (img) img.src=img_lib[id+'_off'].src; } function NewChangeImg(img_id, src_id) { var img=(document.images)?document.images[img_id]: ((document.all)?document.all[img_id]:((document.getElementById)?document.getElementByID(img_id):0)); if (img) img.src=img_lib[src_id].src; } //function to do highlighting of menu var BgMenu1Over='#ff9900'; var BgMenu1Out='#ffffff'; var BgMenu2Over='#FFCC66'; var BgMenu2Out='#FFCC99'; var Browser = NewCheckBrowser(); function NewChangeMenuBgColor(id, color) { var el1 = NewGetCell(id + '_1'); el1.bgColor = color; var el2 = NewGetCell(id + '_2'); el2.bgColor = color; } function NewGetCell(id) { return document.all ? document.all(id) : document.getElementById ? document.getElementById(id) : null } //Returns the document object function NewGetImage(id) { var img=(document.images)?document.images[id]: ((document.all)?document.all[id]:((document.getElementById)?document.getElementByID(id):0)); return img; //if (Browser.IE4plus || Browser.IEmac) return document.all[id]; //if (Browser.NS4) return document.images[id]; //if (Browser.NS6) return document.getElementById(id); } //Returns the document object function NewGetElement(id) { if (Browser.IE4plus || Browser.IEmac) return document.all[id]; if (Browser.NS4) return document[id]; if (Browser.NS6 || navigator.userAgent.indexOf("Mozilla") || navigator.userAgent.indexOf("Opera") ||navigator.userAgent.indexOf("Safari")) return document.getElementById(id); } function NewSwapClass(id, className) { var el = NewGetElement(id).className = className; } function NewCheckBrowser() { var br = new Object(); br.isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false; br.NS4 = (document.layers) ? true : false; br.IEmac = ((document.all)&&(br.isMac)) ? true : false; br.IE4plus = (document.all) ? true : false; br.IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false; br.IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false; br.IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false; ver4 = (br.NS4 || br.IE4plus) ? true : false; br.NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false; br.IE5plus = br.IE5 || br.IE6; br.IEMajor = 0; if (br.IE4plus) { var start = navigator.appVersion.indexOf("MSIE"); var end = navigator.appVersion.indexOf(".",start); br.IEMajor = parseInt(navigator.appVersion.substring(start+5,end)); br.IE5plus = (br.IEMajor>=5) ? true : false; } return br } function NewOnLoadSpecs() { var cnt = 1; while (NewGetCell('sp_'+ cnt + 'text')) { ToggleSpecs('sp_'+ cnt); cnt++; } } function NewToggleSpecs(id) { var oImage = NewGetCell(id + 'image'); var oText = NewGetCell(id + 'text'); var oGutter = NewGetCell(id + 'gutter'); var oContent = NewGetCell(id + 'content'); if (oContent.style.display != 'none') { //Show (expand) if (oImage) oImage.src = 'images/4360_1.gif'; if (oText) oText.style.color = '#000000'; if (oGutter) oGutter.style.display = ''; if (oContent) oContent.style.display = 'none'; }else{ //Hide (collapse) if (oImage) oImage.src = 'images/4359_1.gif'; if (oText) oText.style.color = '#FF9900'; if (oGutter) oGutter.style.display = 'none'; if (oContent) oContent.style.display = ''; } } function contextPopup(url) { var wincontext = window.open(url, 'wincontext', 'width=357,height=425,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,menubar=no,status=yes'); wincontext.focus(); } //Changed to support the case when there is no rollover image given function New_SwapImage(ImgId,ImgSrc){ if (document.images && ImgSrc!='' && ImgSrc!= null) { document.images[ImgId].src = ImgSrc; } } function New_PreloadImage(ImgSrc) { myImg = new Image(); myImg.src = ImgSrc; } function New_BrowserWindow(theURL,winName,features) { window.open(theURL,winName,features); } function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } function openLargePopupWin2(URL) { aWindow = window.open(URL,"largepopup","toolbar=no,width=750,height=580,status=no,scrollbars=yes,resizable=yes,menubar=no"); } /* Objective : Function for popup Date : 21Jun2005 Author : Jason Date : 24Jun2005 Updated by Harkirti Date : 21Mar2006 Modifed the MyWindow function for artf273769*/ var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off) var collapseprevious="no" //Collapse previously open content when opening present? (yes/no) function NewWindow(mypage,myname,w,h,scroll,resize){ if(scroll == 1){ scroll= 'yes'; } else{ scroll= 'no'; } if(resize == 1){ resize= 'yes'; } else{ resize= 'no'; } if (w=='null' || w=='') { w=425; } if (h=='null' || h=='') { h=425; } var winl = 150; var wint = 180; var vloc = 'no'; var vtool = 'no'; var vdire = 'no'; var vstatus = 'yes'; var settings ='height='+h+','; settings +='width='+w+','; settings +='top='+wint+','; settings +='left='+winl+','; settings +='scrollbars='+scroll+','; settings +='resizable='+resize+','; settings +='toolbar= '+vtool+','; settings +='location= '+vloc+','; settings +='directories= '+vdire+','; settings +='status= '+vstatus+','; win=window.open(mypage,myname,settings); } function NewWindowWithoutStatusBar(mypage,myname,w,h,scroll,resize){ if(scroll == 1){ scroll= 'yes'; } else{ scroll= 'no'; } if(resize == 1){ resize= 'yes'; } else{ resize= 'no'; } if (w=='') { w=425; } if (h=='') { h==425; } var winl = 150; var wint = 180; var vloc = 'no'; var vtool = 'no'; var vdire = 'no'; var vstatus = 'yes'; var settings ='height='+h+','; settings +='width='+w+','; settings +='top='+wint+','; settings +='left='+winl+','; settings +='scrollbars='+scroll+','; settings +='resizable='+resize+','; settings +='toolbar= '+vtool+','; settings +='location= '+vloc+','; settings +='directories= '+vdire+','; settings +='status=no'; win=window.open(mypage,myname,settings); } function NewStandardWindow(mypage,myname,settings){ win=window.open(mypage,myname,settings); } /* Function to display messg on the new popup window Updated By: Ganeshan */ function switchImg(firstimage,firstsrc){ if (document.images) { document.images[firstimage].src = firstsrc; } } function OnChangeList(index) { if (index==1) { var index=document.Downloads.phonesel1.options.selectedIndex; document.Downloads.phonesel2.options[index].selected=true; }else{ var index=document.Downloads.phonesel2.options.selectedIndex; document.Downloads.phonesel1.options[index].selected=true; } } function getElementbyClass(rootobj, classname){ var temparray=new Array() var inc=0 var rootlength=rootobj.length for (i=0; i 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function getselectedItem(){ if (get_cookie(window.location.pathname) != ""){ selectedItem=get_cookie(window.location.pathname) return selectedItem } else return "" } function saveswitchstate(){ var inc=0, selectedItem="" while (ccollect[inc]){ if (ccollect[inc].style.display=="block") selectedItem+=ccollect[inc].id+"|" inc++ } document.cookie=window.location.pathname+"="+selectedItem } /* * This JavaScript function takes one parameter, which is the string that needs to be * trimmed. The function then loops through each of the characters of this string, * starting with the first one. If the current character in the loop is a single white * space " ", the function removes it from the string and continues with the loop. The * loop goes on until it finds character, which is different than a single white space * or until it reaches the end of the string. After the function exits the loop, it * returns the trimmed string. */ function trimAll(sString) { while (sString.substring(0,1) == ' ') { sString = sString.substring(1, sString.length); } while (sString.substring(sString.length-1, sString.length) == ' ') { sString = sString.substring(0,sString.length-1); } return sString; } function getImagePath(className,name,width,height,alt,contextRoot,imagePath) { var imageTag = ""; imageTag = ""; return (imageTag); } /* This function is called by Flash Promo which are displayed on the Hellomoto Site */ function OpenLink() { if(hyperlink=='') return; if(winStyle=='0') { window.location.href=hyperlink; } else if(winStyle=='1') { window.open(hyperlink,'Hellomoto',''); } else { NewWindow(hyperlink,'Hellomoto',popW,popH,popS,popR); } } function OpenLink(pNum) { if( !("hasMultipleHyperlink" in window)) { if(hyperlink=='') return; if(winStyle=='0') { window.location.href=hyperlink; } else if(winStyle=='1') { window.open(hyperlink,'Hellomoto',''); } else { NewWindow(hyperlink,'Hellomoto',popW,popH,popS,popR); } } else if( hasMultipleHyperlink != true) { if(hyperlink=='') return; if(winStyle=='0') { window.location.href=hyperlink; } else if(winStyle=='1') { window.open(hyperlink,'Hellomoto',''); } else { NewWindow(hyperlink,'Hellomoto',popW,popH,popS,popR); } } else { if(hyperlinks[pNum]==null) return; if(win_Style[pNum]=='0') { window.location.href=hyperlinks[pNum]; } else if(win_Style[pNum]=='1') { window.open(hyperlinks[pNum],'Hellomoto',''); } else { NewWindow(hyperlinks[pNum],'Hellomoto',popUp_Width[pNum],popUp_Height[pNum],popUp_Resize[pNum],popUp_Scroll[pNum]); } } } function openNHPLink(hyperlink,windowStyle,popH,popR,popS,popW) { if(hyperlink=='') return; if(windowStyle=='0') { window.location.href=hyperlink; } else if(windowStyle=='1') { window.open(hyperlink,'Hellomoto',''); } else { NewWindow(hyperlink,'Hellomoto',popW,popH,popS,popR); } if(isWebTrendsEnabled == '1') dcsMultiTrack('DCS.dcsuri',hyperlink,'WT.ti',webTrendsTag,'DCSext.SpecialPromo',promoName); } function do_onload(){ uniqueidn=window.location.pathname+"firsttimeload" var alltags=document.all? document.all : document.getElementsByTagName("*") ccollect=getElementbyClass(alltags, "switchcontent") statecollect=getElementbyClass(alltags, "showstate") if (enablepersist=="on" && ccollect.length>0){ document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load if (!firsttimeload) revivecontent() } if (ccollect.length>0 && statecollect.length>0) revivestatus() } function DoNav(theUrl) { document.location.href = theUrl; } /* This function is called by all Site and Primary Navigations on the Hellomoto Site to generate the requisite URLS for hyperlinks as per input parameters*/ function navigateByWidowStyle(hyperlink, windowStyle, popW ,popH ,popR ,popS) { if(popW == null || popW == '') popW="425"; if(popH == null || popH == '') popH="425"; if(popS == null) popS=""; if(popR == null) popR=""; var outputURL = ''; if (windowStyle != null) { if (windowStyle == '2') { //if window style is Popup,the java script function NewWindow // is used to open a popup. NewWindow( hyperlink ,'Hellomoto',popW ,popH ,popS ,popR); } else if (windowStyle == '1') { //if window style is New window,the URL is opened in a new window. window.open(hyperlink); } else { //if window style is Same window,the URL is opened in same window. window.location.href = hyperlink; } } } if (window.addEventListener) window.addEventListener("load", do_onload, false) else if (window.attachEvent) window.attachEvent("onload", do_onload) else if (document.getElementById) window.onload=do_onload if (enablepersist=="on" && document.getElementById) window.onunload=saveswitchstate function popUp( URL ) { var width = 400; var height = 250; var left = ( screen.width - width - 20 ) / 2; var top = ( screen.height - height ) / 3; eval( "win = window.open( URL, 'tarsin', 'toolbar=0,scrollbars=0,location=0,status=0,resizable=0,menubar=0,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "' );" ); win.owner = window; win.window.focus( ); return false; } function stepLink( step ) { document.sendApplicationForm.step.value = step; return linkSubmitForm( 'sendApplicationForm' ); } function submitForm( ) { if ( !document.submitting ) { document.cookie = "submitting=true"; document.submitting = true; return true; } else { return false; } } function wasSubmitting( ) { return ( document.cookie && ( document.cookie.indexOf( "submitting=true" ) != -1 ) ); } function linkSubmitForm( name ) { if ( submitForm( ) ) document[ name ].submit( ); return false; } function menuItemLink( link, href ) { var canNavigate = true; if ( typeof window.onunload == "function" ) { canNavigate = window.onunload.call( ); window.onunload = null; } if ( canNavigate ) link.href = href; return canNavigate; } function createItem( form, action, page ) { document[ form ].action = action; document[ form ].cmd.value = "edit"; document[ form ].id.value = "-1"; document[ form ].refer.value = page; return linkSubmitForm( form ); } function editItem( form, action, id ) { return( editItemWithCommand( "edit", form, action, id ) ); } function editItemWithCommand( commandValue, form, action, id ) { document[ form ].action = action; document[ form ].cmd.value = commandValue; document[ form ].id.value = id; return linkSubmitForm( form ); } function saveItem( form, action, cmd ) { document[ form ].action = action; document[ form ].cmd.value = cmd; return linkSubmitForm( form ); } function cancelItem( form, action ) { document[ form ].action = action; return linkSubmitForm( form ); } function deleteItem( form, action, message, id ) { if ( confirm( message ) ) { document[ form ].action = action; document[ form ].cmd.value = "delete"; document[ form ].id.value = id; linkSubmitForm( form ); } return false; } function filterList( form, action, cmd, value ) { document[ form ].action = action; document[ form ].cmd.value = cmd; document[ form ].filter.value = value; return linkSubmitForm( form ); } function deleteChild( form, message, type, id ) { if ( confirm( message ) ) { document[ form ].cmd.value = "delete" + type; document[ form ].deletedId.value = id; makeDirty( ); warn_onunload = false; linkSubmitForm( form ); } return false; } function replyMessage( form, action, id ) { document[ form ].action = action; document[ form ].cmd.value = "edit"; document[ form ].id.value = id; return linkSubmitForm( form ); } function selectMove( form, src, dst ) { var srcSelect; var dstSelect; var options; srcSelect = document.forms[form].elements[src]; dstSelect = document.forms[form].elements[dst]; options = new Array( ); for ( var i = 0; i < dstSelect.options.length; i++ ) { dstSelect.options[i].selected = false; options[i] = dstSelect.options[i]; } for ( var i = srcSelect.options.length - 1; i >= 0 ; i-- ) { if ( srcSelect.options[i].selected ) { options[options.length] = srcSelect.options[i]; srcSelect.options[i] = null; } } options.sort( sortOptions ); dstSelect.options.length = 0; for ( var i = 0; i < options.length; i++ ) dstSelect.options[i] = options[i]; } function sortOptions( a, b ) { var aText; var bText; aText = a.text.toLowerCase( ); bText = b.text.toLowerCase( ); if ( aText < bText ) return -1; if ( aText > bText ) return 1; return 0; } function selectOptions( form, sel ) { var select; select = document.forms[form].elements[sel]; for ( var i = 0; i < select.options.length; i++ ) select.options[i].selected = true; }