function Dictionary2(code, width, height) {
    win=window.open('http://www.recruitmentsuper.com.au/recruit/rsweb/dictionary/' + code + '.jsp','Dictionary', 'scrollbars=no,resizable=yes,width=' + width + ',height=' + height);
}


function Dictionary(code){

    var win
win=window.open('../dictionary/'+code+'.jsp','Dictionary', 'scrollbars=yes,width=320,height=300')

}

function evalPath(path) {
  if (path.substring(0, 1) == '/') {
    return path;
  } else {
    root = window.location.pathname;
    root = root.substring(0, root.lastIndexOf('/'));
    while ((idx = path.indexOf('/')) != -1) {
      bit = path.substring(0, idx);
      if (bit == '..') {
        root = root.substring(0, root.lastIndexOf('/'));
        path = path.substr(3);
      } else if (bit == '.') {
        path = path.substr(2);
      } else {
        break;
      }
    }
    return root+'/'+path;
  }
}

function popupWin(app) {
	host = window.location.host;
	theheight = (window.screen.availHeight - 60);
	thewidth = (window.screen.availWidth - 20);

	window.open('https://' + host + '/rssf/' + app, 'ePASS', 'width=' + thewidth + ',height=' + theheight + ',screenX=5,screenY=5,left=5,top=5,resizable=yes,menubar=no,scrollbars=yes,titlebar=no,toolbar=no,status=yes');
    //window.open('https://192.168.2.21/rssf/' + app, 'ePASS', 'width=' + thewidth + ',height=' + theheight + ',screenX=5,screenY=5,left=5,top=5,resizable=yes,menubar=no,scrollbars=yes,titlebar=no,toolbar=no,status=yes');
}

function newWindow(theURL,winName,features) {
  //make this a secure link
  url = 'http://'+document.location.host+theURL;
  window.open(url,winName,features);
}

function ie4_message(){
	var version
	if (navigator.appName.indexOf('Microsoft') != -1) {
		version = navigator.appVersion
		version = parseFloat(version.substring(version.indexOf('MSIE')+4,version.length))
		if (version >= 4.00 && version <= 4.01){
			minorver=navigator.appMinorVersion
			if (minorver.substring(1,3)=='SP') return
			document.writeln('<font size="-1">*Please note if you encounter a javascript \n'+
		      'error in Internet Explorer 4 or 4.01 of type: &quot;Error: No such interface \n'+
		      'supported&quot; when viewing this page, you will need to either upgrade \n'+
		      'your <a href="browser.html">web browser</a> or <a href="javaScriptFix.bat">click \n'+'here</a> to download a fix. (Win 95, Win98 and Win NT 4.0). <a href="support.html">Look \n'+'in Help for additional information</a>*')
		}
	}
}
function java_message(){
	var version
	if (navigator.appName.indexOf('Microsoft') != -1) {
		version = navigator.appVersion
		version = parseFloat(version.substring(version.indexOf('MSIE')+4,version.length))
		if (version >= 5.00){
			document.writeln('If you are running Internet Explorer 5+ and have not installed a Java Virtual Machine \n'+'and Install on demand is enabled, you will be prompted to download and install one.')
            return;
		}
	}
	if (navigator.appName.indexOf('Netscape') != -1) {
		if (navigator.javaEnabled()){
			document.writeln('<center>Java is Enabled</center>')
		}else{
			document.writeln('<center>Java is Disabled</center>')
		}
	}
}

function checkAndUpdateContactForm() {

	// this is form 1 because of the site form on in the templates.
	var form = document.forms[1];

	if (form['Name'].value == '') {
		alert("The name feild must be filled out");
		return;
	}

	if (form['Email'].value == '') {
		alert("The email field must be filled out");
		return;
	}

	if (form['State'].selectedIndex == 0) {
		alert("Please choose a state");
		return;
	}

	if (form['destination'].selectedIndex == 0) {
		alert("Please choose a topic, this will help us by redirecting the mail to the appropriate person");
		return;
	}

	// now create the form-id
	var destIndex =  form['destination'].selectedIndex;
	var destination = form['destination'].options[destIndex].value;
	var stateIndex = form['State'].selectedIndex;
	var state = form['State'].options[stateIndex].value;

	if (destination == 'new-employer') {
		form['form-id'].value = 'new-employer-' + state;
	} else if (destination == 'new-member') {
		form['form-id'].value = 'new-member-' + state;
	} else {
		form['form-id'].value = destination;
	}

	// alert('form-id now = ' + form['form-id'].value);

	form.submit();
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document;
if((p=n.indexOf("?"))>0&&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<d.forms.length;i++)
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}

/*#################  NEW WINDOW SCRIPT ############################## */

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Updated by: Mike Weiner :: http://www.wearebent.com 
Original author: Eric King (eric_andrew_king@hotmail.com)
Last Updated: May 2006

Changes: Added parameters for optional scrollbars, resizablility,
menubar, toolbar, addressbar, statusbar, fullscreen. Also tweaked the
implementation a bit - links will now give the user a popup window
even if JavaScript is disabled.

Notes: Some parameters are not cross-browser capable (e.g. fullscreen).
Browsers that do not support these abilities will ignore them.

Usage: The link is written as follows: 
onclick="newWindow(this.href, 'popup', 600, 500, 1, 1, 0, 0, 0, 1, 0); return false;"

Usage Description:
"this.href" refers to the URL given in the "a" tag; "'popup'" is the name of the popup window;
600 is the width of the popup window; 500 is the height of the popup window; the numbers that
follow designate whether a property is turned on ("1") or off ("0"), in this order:
scrollbars, resizable, menubar, toolbar, addressbar, statusbar, fullscreen
*/

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}

/*#################  END OF NEW WINDOW SCRIPT ######################## */


/*#################  OLD WINDOW SCRIPT ############################## */

/* This script will close open a link the parent of a child window and then close the child */

function oldWindow(windowURL)
{
	opener.location=windowURL;
	self.close();
}

/*#################  END OF OLD WINDOW SCRIPT ######################## */

// JavaScript Document
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Displays "original" image. On yr/m/d, it switches to "replacement" image */
//Cameron Mann, October 2008 to make it do the right thing :)

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function change_on_date(yr,m,d,original,originallink,replacement,replacementlink){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)

if (difference>0){
  document.write("<a href=\""+originallink+"\"> <img src=\""+original+"\" border=0 style=\"MARGIN-BOTTOM: 15px\" height=163 ></a>"); //original image
   }
 else{
  document.write("<a href=\""+replacementlink+"\"> <img src=\""+replacement+"\" border=0 style=\"MARGIN-BOTTOM: 15px\" height=163></a>"); //on and after change date
   } 
}
//enter the count down date using the format year/month/day

// JavaScript Document
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Displays "original" text. On yr/m/d, it switches to "replacement" text */
//Cameron Mann, October 2008 to make it do the right thing :)

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function change_text_on_date(yr,m,d,original,replacement){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var futurestring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)

if (difference>0){
  document.write(original); //original image
   }
 else{
  document.write(replacement); //on and after change date
   } 
}
//enter the count down date using the format year/month/day