var debug_mode = false; var XEROX_HOME = "Xerox Home Page"; /* inserts empty space in the value, if value exceeds the given length*/ function limitLength(value, len) { var newString = ""; var replaceChar = "
"; while(value.length >= len) { var tempStr = value.substring(0, len); value = value.substring(len); newString = newString + tempStr + replaceChar; } if(value.length <= 0) { newString = newString.substring(0, newString.length - replaceChar.length); } return newString + value; } function SetSecurityCookie() { if(document.cookie.indexOf("xuser") != -1) return; document.cookie = "xuser=" + escape("webclient"); } //This function is to display copyright & xerox logo function LoadFooter() { document.write("
"+ ""+ ""+ "
" + "Copyright © 2008 Xerox Corporation. " + " All rights reserved."+ "

"+ ""+ ""+ "

"+ "
"); SetSecurityCookie(); } function LoadFooterForFilesInRoot() { document.write("
"+ ""+ ""+ "
" + "Copyright © 2008 Xerox Corporation. " + " All rights reserved."+ "

"+ ""+ ""+ "

"+ "
"); SetSecurityCookie(); } //This function is to display copyright & xerox logo function LoadHomeFooter() { document.write("
"+ ""+ ""+ "
" + "Copyright © 2008 Xerox Corporation. " + " All rights reserved."+ "

"+ ""+ ""+ "
"+ "
"); SetSecurityCookie(); } //This function is to set the current selected language // langcode is defined in ISO 639-1 2-character // the order of lang info must be matched with httplang.cxx var gWebLanguageInfoArray = new Array( "en", "English", "utf-8", // def lanugage "fr", "Français", "utf-8", "it", "Italiano", "utf-8", "de", "Deutsch", "utf-8", "es", "Español ", "utf-8", "pt", "Português", "utf-8", "ru", "Русский", "utf-8", "zh", "简体中文 ", "utf-8", "tw", "繁體中文", "utf-8"); var gWebLanguageTable = new Array(); function AddLanguageInfo(szLangCode, szLangDesc, szCharSet) { this.szLangCode = szLangCode; this.szLangDesc = szLangDesc; this.szCharSet = szCharSet; } function InitLanguageTable() { var nFxLangInstall = 0; if(gWebLanguageTable.length != 0) return; nLangNum = gWebLanguageInfoArray.length / 3; if(nFxLangInstall == 0) // SC & TC are not supported. nLangNum = nLangNum - 2; for(i=0; i < nLangNum; i++) { gWebLanguageTable[i] = new AddLanguageInfo(gWebLanguageInfoArray[(i*3)], gWebLanguageInfoArray[(i*3)+1], gWebLanguageInfoArray[(i*3)+2]); } } function ChangeDefWebLanguage() { var szDefLangCode = "en"; var nDefLangIdx = 0; var szCookieValue = ""; InitLanguageTable(); for(i=0; i < gWebLanguageTable.length; i++) { if(szDefLangCode == gWebLanguageTable[i].szLangCode) { nDefLangIdx = i; break; } } szCookieValue = nDefLangIdx; DeleteCookie("language"); SetCookie("language", szCookieValue); location = "/home.html"; } function ChangeWebLanguage(nIdx) { var nDefLangIdx = 0; var szCookieValue = ""; InitLanguageTable(); if(nIdx < gWebLanguageTable.length) { nDefLangIdx = nIdx; } szCookieValue = nDefLangIdx; DeleteCookie("language"); SetCookie("language", szCookieValue); location = location.href; } function DisplayLanguageComboList() { var nCurLangIdx = 0; InitLanguageTable(); document.write(""); } // SwapImage will do the actual changing of the images when rolling over is required. function SwapImage( inButtonName, inButtonToDisplay ) { var buttonObject = eval( "document." + inButtonName ); if ( buttonObject ) { buttonObject.src = inButtonToDisplay; } return; } function IsNumber(TempString) { if (TempString.length < 1) return false for (var i = 0 ; i < TempString.length ; i++) if ((TempString.charAt(i) < "0") || (TempString.charAt(i) > "9")) return false return true } function isRealNumber(tempString) { var dotNum = 0 if(tempString.length < 1) return false for (var i = 0 ; i < tempString.length ; i++) { if ((tempString.charAt(i) != ".") && ((tempString.charAt(i) < "0") || (tempString.charAt(i) > "9"))) return false else if (tempString.charAt(i) == ".") { if( (i == 0) || (i == tempString.length -1)) return false; dotNum++; } } if(dotNum > 1) return false; return true } function IsInRange(Str, MinVal, MaxVal) { if (Str >= MinVal) { if (Str <= MaxVal) return true } return false } function isString(caller,blankAllowed) { var str =caller.value; var strLength = str.length; var outValid = true; var invalidCharacter = ''; if(!blankAllowed && strLength == 0) { alert(COMMON_ALERT4); caller.focus(); return false; } while (outValid && ( 0 < strLength )) { var characterValid = false; var theCharacter = str.charAt( strLength - 1 ); if ((( "a" <= theCharacter ) && ( "z" >= theCharacter )) || (( "A" <= theCharacter ) && ( "Z" >= theCharacter ))) outValid = true; else { invalidCharacter = theCharacter; outValid = false; } strLength--; } if(!outValid) { alert(COMMON_ALERT6 + " " + invalidCharacter); caller.focus(); return false; } return true; } 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"+ " "+ "
"+ ""+ "

"+ "
"+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :  "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
Contact :  "); document.write(limitLength("Administrator",20)); document.write("
Location :  "); document.write(limitLength("",20)); document.write("
Status :  Sleeping
"+ "
"+ ""+ ""+ ""+ ""+ "
"+ "Refresh Status
"); } function LoadStatusMenuFromRootNonLink() { document.write( ""+ "
"+ ""+ "

"+ "
"+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :  "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
Contact :  "); document.write(limitLength("Administrator",20)); document.write("
Location:  "); document.write(limitLength("",20)); document.write("
Status :  Sleeping
"+ "
"+ ""+ ""+ ""+ ""+ "
"+ "Refresh Status
"); } function LoadStatusMenuForIndexPage() { document.write( ""+ " "+ "
"+ ""+ "

"+ "
"+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :  "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
Contact :  "); document.write(limitLength("Administrator",20)); document.write("
Location :  "); document.write(limitLength("",20)); document.write("
Status :  Sleeping
"+ "
"+ ""+ ""+ ""+ ""+ "
"+ "Refresh Status
"); } function LoadHomeStatusMenu() { document.write( ""+ " "+ "
"+ ""+ "

"+ "
"+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :  "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
Contact :  "); document.write(limitLength("Administrator",20)); document.write("
Location :  "); document.write(limitLength("",20)); document.write("
Status :  Sleeping
"+ "
"+ ""+ ""+ ""+ ""+ "
"+ "Refresh Status
"); } function LoadHelpMenu(menuNo) { if(debug_mode) return; document.write("
"+ ""+ ""+ ""+ "
"+ ""+ ""+ ""+ ""+ "
"+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :   "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
"+ "
"+ ""+ " "+ ""+ ""+ "
"+ ""+ ""+""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ "
Print
Xerox Phaser 3250
"+((menuNo == 1)? "" : "")+"Print Menu Map
"+((menuNo == 2)? "" : "")+"Print Demo Pages
"+((menuNo == 3)? "" : "")+"Print Configuration Pages
"+((menuNo == 4)? "" : "")+"Firmware Download
"+ "
"); } function LoadPrinterPropertiesMenu() { if(debug_mode) return; document.write(""+ ""+ ""+ ""+ "
"+ ""+ " "+ ""+ ""+ ""+ ""+ ""+ ""+ ""+ " "+ ""+ ""+ ""+ "
Name :   "); document.write(limitLength("XRX9C934E061F41",20)); document.write("
DNS :   158.194.108.165
IP :   158.194.75.180
"+ "
"); } var FIRST_PRINTABLE_CHAR_VALUE = 33; var LAST_PRINTABLE_CHAR_VALUE = 127; function findNonSupportable(caller,inBlankNotAllowed,isSpaceAllowed) { var outValid = true; var defaultMessageField = caller; var defaultMessage = defaultMessageField.value; var messageLength = defaultMessage.length; var changeFirstPrintableChar = 0; if(isSpaceAllowed == true) changeFirstPrintableChar = -1; //if isSpaceAllowed is true, //FIRST_PRINTABLE_CHAR_VALUE is 32! if ( inBlankNotAllowed && ( "" == caller.value )) { alert( "Blank input is not allowed."); return false; } // check for unprintable characters (Latin 1), but character 127 (delete) // is not valid for ( counter = 0; counter < messageLength; counter++ ) { var theCharCode = defaultMessage.charCodeAt( counter ); if(( (FIRST_PRINTABLE_CHAR_VALUE + changeFirstPrintableChar) > theCharCode ) ||( LAST_PRINTABLE_CHAR_VALUE < theCharCode )) { alert( "Illegal character :" +"'" +defaultMessage.charAt( counter ) + "'"); outValid = false; return outValid; } } return outValid; } // end findNonPrintable // Focuses & Selects the object function setTarget(obj) { obj.select(); obj.focus(); } // Validate the file path if it is Windows OS function isValidFilePath(strPath) { if(navigator.platform.toLowerCase().indexOf("win") != -1) { if(strPath.charAt(0) == "\\") return true; if(strPath.charAt(1) == ":") return true; return false; } return true; }