// fullwin1.js // CONSTRUCTOR FUNCTION TO CREATE FULLWIN OBJECT function _fullWin_object ( win_url, win_name, win_ref, win_features ) { this.win_url = win_url; this.win_name = win_name; this.win_ref = win_ref; this.win_features = win_features; } // DECLARE SCRIPTS ARRAY var _fullWin = new Array; function _fullWindow(winURL) { var winName = replaceBadCharacters(winURL); var linkID = ""; if (_fullWindow.arguments.length > 1 && _fullWindow.arguments[1].length > 0) { linkID = _fullWindow.arguments[1]; winName += linkID; } // MAKE ROBUST FUNCTION - TEST ARGUMENTS FIRST if (_fullWindow.arguments.length < 1) { alert ( "\nPage Scripting Error!\nInvalid number of arguments passed to 'full_window' function.\n" ); return(false); } else if ( typeof ( winName ) != "string" || winName.length < 2) { alert ( "\nPage Scripting Error!\nInvalid 'targetName' string passed to 'full_window' function.\n" ); return (false); } var win_num = _fullWin.length; var found = false; for (var num=0; num<_fullWin.length; num++) { if ( winURL==_fullWin[num].win_url && winName==_fullWin[num].win_name) { win_num = num; found = true; break; } } if (!found) { _fullWin[win_num] = new _fullWin_object ( winURL, winName, null, "" ); } var fw = _fullWin[win_num]; // IF FULL WINDOW IS ALREADY OPEN if (remoteWindowOpen(fw.win_ref)) { // BRING EXISTING WINDOW TO TOP fw.win_ref.focus (); return(remoteWindowOpen(fw.win_ref)); } fw.win_features = full_window_features (); var win_ref = window.open(fw.win_url,fw.win_name,fw.win_features); fw.win_ref = win_ref; if (remoteWindowOpen(fw.win_ref)) { fw.win_ref.focus (); } var retCode = remoteWindowOpen(fw.win_ref); // alert(retCode); return(retCode); } function replaceBadCharacters(string) { // CONVERT STRING TO UPPER CASE string = string.toUpperCase(); // REMOVE COMMON EXTENSION FROM END OF FILENAME string = string.replace(/.htm|.html$|.shtml|.asp/i,""); // REMOVE PROTOCOL FROM BEGINNING OF URL // string = string.replace(/^http:\/\/www.|http:\/\//i,""); // REMOVE ALL BAD CHARACTERS FROM REMAINING STRING string = string.replace(/\/|:|\+|-|\.|_| |=|#|%|\?|\&|,/ig,""); // REDUCE LENGTH OF STRING TO 12 string = string.substr(string.length-12,12); return(string); } function full_window_features () { var featuresList = "directories=yes"; if ( navigator.userAgent.indexOf ( "Opera" ) > -1 ) { featuresList += ",top=0"; // doesn't WORK featuresList += ",left=0"; // doesn't WORK featuresList += ",height=" + screen.availHeight; featuresList += ",width=" + screen.availWidth; } else if ( navigator.userAgent.indexOf ( "Gecko" ) > -1 ) { featuresList += ",top=" + screen.availTop; featuresList += ",left=" + screen.availLeft; featuresList += ",height=" + ( screen.availHeight - 144 ); featuresList += ",width=" + ( screen.availWidth - 7 ); } else if ( document.all ) { featuresList += ",top=" + parseInt(screen.availTop,10); featuresList += ",left=" + parseInt(screen.availLeft,10); featuresList += ",height=" + screen.availHeight; featuresList += ",width=" + screen.availWidth; } else if ( document.layers ) { featuresList += ",top=" + screen.availTop; featuresList += ",left=" + screen.availLeft; featuresList += ",height=" + ( screen.availHeight - 157 ); featuresList += ",width=" + ( screen.availWidth - 11 ); } else if ( navigator.javaEnabled () ) { var toolkit = java.awt.Toolkit.getDefaultToolkit (); var screen_size = toolkit.getScreenSize (); featuresList += ",width=" + ( screen_size.width - 13 ); featuresList += ",height=" + ( screen_size.height - 194 ); } else if ( typeof ( screen ) == "object" ) { featuresList += ",top=" + screen.availTop; featuresList += ",left=" + screen.availLeft; featuresList += ",height=" + screen.availHeight; featuresList += ",width=" + screen.availWidth; } featuresList += ",location=1"; featuresList += ",menubar=1"; featuresList += ",scrollbars=1"; featuresList += ",status=1"; featuresList += ",toolbar=1"; featuresList += ",resizable=1"; featuresList += ",fullscreen=0"; return(featuresList); } // CROSS PLATFORM, BOOLEAN, ERROR FREE TEST TO CHECK IF REMOTE WINDOW IS OPEN function remoteWindowOpen(window_reference) { if (window_reference !== null && window_reference.closed === false) { return(true); } return(false); } //================================================================================= function getMe() { var prot = '\x6D' + '\x61\x69\x6C' + '\x74\x6F'; var addr = "\x48\x61d\x6Cey\x47\x40\x77eb\x2D\x77\x69se\x2D\x77\x69zard\x2E\x63\x6F\x6D"; var htmstr = '
'; htmstr += ''; htmstr += ''; htmstr += ''; htmstr += '
'; document.write(htmstr); } function linksMouseover() { if (document.getElementById) { document.getElementById("exchangeBanner").src = SwapLinks.src; } else if (document.all || document.layers) { document.exchangeBanner.src = SwapLinks.src; } } function linksMouseout() { if (document.getElementById) { document.getElementById("exchangeBanner").src = ExchangeLinks.src; } else if (document.all || document.layers) { document.exchangeBanner.src = ExchangeLinks.src; } } //================================================================================= function footerLinks(doctype,css,jsTested,icra) { var pathName = location.pathname.replace(/\\/g,"/"); var siteIndex = false; if (pathName == "/" || pathName.match(/\/www\/index.html$/i)) { siteIndex = true; } else if (pathName == "/~webwisew/") { siteIndex = true; } var preFix = (siteIndex) ? "" : "../"; var htmstr = ' '; htmstr += ' '; htmstr += '