/*********************************************************************************
Global variables
*********************************************************************************/
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
var isNav, isIE, isNav6
var coll = ""
var styleObj = ""
if (parseInt(navigator.appVersion) >= 4) {
if (navigator.appName == "Netscape") {
isNav = true
if (parseInt(navigator.appVersion) >= 5) {
isNav6 = true
}
} else {
isIE = true
coll = "all."
styleObj = ".style"
}
}
/* =START=================================================
Purpose: Printer friendly job ads.
Developer: Kurt Saik
Date: Oct 20, 2003
========================================================== */
//
// Opens printer friendly form along with windows print dialogue box
//
function OpenForm(sForm){
doc=document.forms[0];
var url="./" + sForm + "?openForm";
var name="ItemPopUpWindow";
var args = "dependent=yes,width=600,height=500,screenX=100,screenY=100,titlebar=yes,scrollbars";
// var args = "dependent=yes,width=500,height=700,screenX=200,screenY=300";
if (typeof(popupWin) != "object"){
popupWin = window.open(url,name,args);
}else{
if (!popupWin.closed){
popupWin.location.href = url;
}else{
popupWin = window.open(url, name,args);
}
popupWin.focus();
}
}
function OpenFormPortal(sForm){
doc=document.forms[0];
var url="" + sForm + "?openForm";
var name="ItemPopUpWindow";
var args = "dependent=yes,width=600,height=550,screenX=100,screenY=100,titlebar=yes,scrollbars";
if (typeof(popupWin) != "object"){
popupWin = window.open(url,name,args);
}else{
if (!popupWin.closed){
popupWin.location.href = url;
}else{
popupWin = window.open(url, name,args);
}
popupWin.focus();
}
}
function OpenPortalWin(sURL){
doc=document.forms[0];
var url=sURL;
var name="ItemPopUpWindow";
var args = "";
if (typeof(popupWin) != "object"){
popupWin = window.open(url,name,args);
}else{
if (!popupWin.closed){
popupWin.location.href = url;
}else{
popupWin = window.open(url, name,args);
}
popupWin.focus();
}
}
//
// Only works in Internet Explorer
//
function ZoomClose(sx,sy){
var ii = 10
var xx = sx/ii
var iHolder = sx
for (var i=1;i<=xx;i++) {
iHolder = iHolder - ii
resizeTo(iHolder,iHolder);
}
}
/* =========================================================
Purpose: Printer friendly job ads.
==STOP==================================================== */
/*********************************************************************************
Convert object name string or object reference into a valid object reference
*********************************************************************************/
function getObject(obj) {
var theObj
if (typeof obj == "string") {
theObj = eval("document." + coll + obj + styleObj)
} else {
theObj = obj
}
return theObj
}
/*********************************************************************************
Window Resize
*********************************************************************************/
NS4 = document.layers;
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;
}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if (NS4) onresize = reDo;
/*********************************************************************************
Check for Images
*********************************************************************************/
if (document.images) {
goodVersion = true;
} else {
goodVersion = false;
}
/*********************************************************************************
Browser Version & Platform Check
*********************************************************************************/
DHTMLversion = "Disabled"
if (navigator.appVersion.substring(0, 1) >= 4) {
if (navigator.userAgent.indexOf("MSIE", 0) > -1) {
if (false) { //(navigator.userAgent.indexOf("Mac", 0) > -1) {
DHTMLversion = "Disabled"
} else {
DHTMLversion = "MSIE"
}
} else if (navigator.userAgent.indexOf("Mozilla", 0) > -1) {
DHTMLversion = "NS"
}
}
//--- Browser Version & Platform Check
function imageSwap(which, state) {
if(timer2) {
window.clearTimeout(timer2);
}
if (goodVersion) {
//var thisImage = document.images[which];
var thisImage = getImage(which);
var thisImageSrc = thisImage.src;
var imageName = thisImageSrc.substring(0,thisImageSrc.lastIndexOf("_o"));
if (state == 0) {
thisImage.src = imageName + "_off.gif"
} else {
thisImage.src = imageName + "_on.gif"
}
}
}
if (goodVersion) {
var PageImages = new Array();
var PageAltImages = new Array();
}
var timer
var timer2
var speed = 10
function imageSwapSlow(obj, state) {
if(timer2) {
window.clearTimeout(timer2);
}
timer2 = window.setTimeout("imageSwap(" + "\'" + obj + "\','0'" + ")", speed)
}
//--- Images Preload
function LoadActiveImages() {
if (goodVersion) {
var num = document.images.length;
for (var i = 0; i < num; i++) {
var thisImage = document.images[i];
var thisImageSrc = thisImage.src;
var imageName = thisImageSrc.substring(0,thisImageSrc.indexOf("_o"));
//document.write(imageName + "
");
if (thisImageSrc.indexOf("_off") != -1) {
PageImages[i] = new Image(thisImage.width, thisImage.height);
PageImages[i].src = imageName + "_on.gif";
alert(imageName + "_on.gif")
} else if (thisImage.src.indexOf("_on") != -1) {
PageAltImages[i] = new Image(thisImage.width, thisImage.height);
PageAltImages[i].src = imageName + "_off.gif";
alert(imageName + "_off.gif")
//var ImagePtr = getImage(thisImage);
//document.images[getImage(thisImage)].src = imageName + "_off.gif";
//document.images[getImage(thisImage)].src = imageName + "_off.gif";
}
}
}
}
function getImage(inputName) {
//document.write("About to get Image: " + image_name +"
");
var myImage = document [inputName];
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer == 3) {
if (myImage.length) {
return myImage[myImage.length-1];
} else return myImage;
} else {
return myImage;
}
}
//--- Netscape doesn't handle imageswaps in divs without
//--- specifying the div's position in the document hierarchy
function imageSwapDiv(which, state, whatDiv) {
if (goodVersion) {
//var thisImage = document.images[which];
if ((DHTMLversion == "NS") && (whatDiv != null) && (!isNav6)) {
var thisImage = document.layers[whatDiv].document[which]
} else {
var thisImage = getImage(which)
}
var thisImageSrc = thisImage.src;
var imageName = thisImageSrc.substring(0,thisImageSrc.lastIndexOf("_o"));
if (state == 0) {
var newImagesrc = imageName + "_off.gif"
} else {
var newImagesrc = imageName + "_on.gif"
}
thisImage.src = newImagesrc
}
}
//--- this version of imageSwapDiv handles 2 layers of div's for netscape4.x
function imageSwapDiv2(which, state, whatDiv, whatDiv2) {
if (goodVersion) {
//var thisImage = document.images[which];
if ((DHTMLversion == "NS") && (whatDiv != null)) {
var thisImage = document.layers[whatDiv].document.layers[whatDiv2].document[which]
} else {
var thisImage = getImage(which)
}
var thisImageSrc = thisImage.src;
var imageName = thisImageSrc.substring(0,thisImageSrc.lastIndexOf("_o"));
if (state == 0) {
var newImagesrc = imageName + "_off.gif"
} else {
var newImagesrc = imageName + "_on.gif"
}
thisImage.src = newImagesrc
}
}
//--- Window Functions
function popWindow(URL,name,widgets) {
popwin = window.open(URL, name, widgets)
popwin.focus()
popwin.opener = self
window.name = "MainWin"
}
function closeWin(){
window.close()
}
hideID = 0
lastViewed = "wholayer"
// Setting the visibility of an object to visible
function show(obj) {
if (isNav6) {
var theObj = document.getElementById(obj)
} else {
var theObj = getObject(obj)
}
if(timer) {
window.clearTimeout(timer);
}
if (isNav6) {
if (theObj.style.visibility != "visible") {
theObj.style.visibility="visible"
}
} else {
if (theObj.visibility != "visible") {
theObj.visibility="visible"
}
}
if (lastViewed != obj) {
hide(lastViewed);
lastViewed=obj
}
}
// Setting the visibility of an object to hidden
function hide(obj) {
if (isNav6) {
var theObj = document.getElementById(obj)
if (theObj.style.visibility != "hidden") {
theObj.style.visibility = "hidden"
}
} else {
var theObj = getObject(obj)
if (theObj.visibility != "hidden") {
theObj.visibility = "hidden"
}
}
}
function hideSlow(obj) {
if(timer) {
window.clearTimeout(timer);
}
timer = window.setTimeout("hide(" + "\'" + obj + "\'" + ")", speed)
}