var bLoaded = false ; // ******************** // Publishing functions // ******************** function BrowserUpgrade() { alert('You are not currently using Internet Explorer 6.0 or above ' + 'on a Microsoft Platform.\n\nIf you use the above browser you ' + 'would be able to edit content via a "What You See Is What You ' + 'Get" (WYSIWYG) user interface. This allows rich formatting of ' + 'your content including font sizing, font style, colour adjustment' + ', element positioning, ordered lists, unordered lists, hyper ' + 'links and clipboard management. Additionally, you can insert, ' + 'position and size multiple images from your on-line image ' + 'library.\n\nIf you have another machine with the above browser ' + 'installed, we suggest using that machine to update your page content.' ) ; } function DisplayEditor(strField) { // Width and height of the editor var iWidth = 750 ; var iHeight = 500 ; var LeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0 ; var TopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0 ; var strUrl = "../editor/editor.asp?Field=" + strField ; window.open( strUrl + "&width=" + iWidth + "&height=" + iHeight, "Editor", 'top=' + TopPosition + ',left=' + LeftPosition + ',height=' + iHeight + ',width=' + iWidth + ',resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no') ; } // ******************** // ******************** function PageClick() { } function InitRollOver() { if (!document.getElementById) return ; var imgOriginSrc ; var imgTemp = new Array(); var imgarr = document.getElementsByTagName('img') ; for (var i = 0; i < imgarr.length; i++) { if (imgarr[i].getAttribute('hsrc')) { // cache the highlight image imgTemp[i] = new Image() ; imgTemp[i].src = imgarr[i].getAttribute('hsrc') ; // Store the original source imgarr[i].setAttribute('osrc', imgarr[i].getAttribute('src')); // Mouse Over imgarr[i].onmouseover = function() { this.setAttribute('src', this.getAttribute('hsrc')) ; } // Mouse Out imgarr[i].onmouseout = function() { this.setAttribute('src', this.getAttribute('osrc')) ; } } } } function CheckFrames() { // Check that we've loaded the frameset var strLoc = String(window.location.href) ; if (top.location.href == strLoc) { // We need to load the frame set top.location.href = "/default.asp?redirectto=" + strLoc ; } } function DisplayPopup(strUrl, strWidth, strHeight) { var iWidth = Number(strWidth) ; var iHeight = Number(strHeight) ; var bHasQry = false ; var LeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0 ; var TopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0 ; // We must add additional width and height values iWidth += 34 ; iHeight += 42 ; if (-1 != strUrl.indexOf(".asp?")) { bHasQry = true ; } window.open( strUrl + ((bHasQry)?"&":"?") + "width=" + strWidth + "&height=" + strHeight, "Help", 'top=' + TopPosition + ',left=' + LeftPosition + ',height=' + iHeight + ',width=' + iWidth + ',resizable=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=no') ; } function DisplayPopupImage(strImage) { var strWidth = 600; var strHeight = 500; var iWidth = Number(strWidth) ; var iHeight = Number(strHeight) ; var bHasQry = false ; var LeftPosition = (screen.width) ? (screen.width-iWidth)/2 : 0 ; var TopPosition = (screen.height) ? (screen.height-iHeight)/2 : 0 ; // We must add additional width and height values iWidth += 34 ; iHeight += 42 ; window.open( '../scripts/popupimage.asp' + ((bHasQry)?'&':'?') + 'width=' + strWidth + '&height=' + strHeight + '&image=' + strImage, 'PopupImage', 'top=' + TopPosition + ',left=' + LeftPosition + ',height=' + iHeight + ',width=' + iWidth + ',resizable=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=no') ; } //Object constructor function makeObj(obj,nest) { nest=(!nest) ? '':'document.'+nest+'.' this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth this.up=goUp;this.down=goDown;this.left=goLeft;this.right=goRight; this.moveIt=moveIt; this.x; this.y; this.obj = obj + "Object" eval(this.obj + "=this") return this } function checkBrowser() { this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(top.document.layers && !this.dom)?1:0; this.ie=(this.ie4 || this.ie5)?1:0 ; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) ; return this } // The client browser object bw = new checkBrowser() ; function getRandom(min,max) { return (Math.round(Math.random()*(max-min)))+min; } function Init() { // Check that the frameset has been loaded //CheckFrames() ; // Initialise roll-over events for images InitRollOver() ; // Load advert /* if (document.images["Footer-Ad"]) { document.images["Footer-Ad"].src = "../images/adverts/ad-" + getRandom(1,2) + ".gif" ; } */ //Do any page initialisation DoPageInit() ; bLoaded = true ; } // Do initialisation onload = Init ;