<!-- 
function formHandler(object){
var URL = object.options[object.selectedIndex].value;
	if (URL.search("###") == -1){
		top.window.location.href = URL;
	} else {
		window.open(URL,'image','scrollbars=no,width=600,height=400,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=no,left=60,screenX=60,top=30,screenY=30');
	}

}


function popup(URL){
window.open(URL,'image','scrollbars=no,width=600,height=400,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=no,left=60,screenX=60,top=30,screenY=30');
window.name="main";
}

function setActiveStyleSheet(title) {
	var i, a, main;
	for ( i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if(a.getAttribute("title") == title) a.disabled = false;
			setCookie( 'textsize', title);
		}
	}
}


function readCookie(name){
	var cookies = document.cookie;
	var start = cookies.indexOf(name + "=");
	var cookie_value = "";
	if (start == -1){
		//alert("no cookie found");
	}
	start = cookies.indexOf("=", start) + 1;
	var end = cookies.indexOf(";", start);
	if (end == -1){
		end = cookies.length;
	}
	var value = unescape(cookies.substring(start,end));
	if (value == null){
		//alert("2 no cookie found");
	} else {
		cookie_value = value;
	}
	return cookie_value;
}

function retrieveCookie( cookieName ) {
	/* retrieved in the format
	cookieName4=value; cookieName3=value; cookieName2=value; cookieName1=value
	only cookies for this domain and path will be retrieved */
	var cookieJar = document.cookie.split( "; " );
	for( var x = 0; x < cookieJar.length; x++ ) {
		var oneCookie = cookieJar[x].split( "=" );
		if( oneCookie[0] == escape( cookieName ) ) { return oneCookie[1] ? unescape( oneCookie[1] ) : ''; }
	}
	return null;
}

function setCookie( cookieName, cookieValue, lifeTime, path, domain, isSecure ) {
	if( !cookieName ) { return false; }
	if( lifeTime == "delete" ) { lifeTime = -10; } //this is in the past. Expires immediately.
	/* This next line sets the cookie but does not overwrite other cookies.
	syntax: cookieName=cookieValue[;expires=dataAsString[;path=pathAsString[;domain=domainAsString[;secure]]]]
	Because of the way that document.cookie behaves, writing this here is equivalent to writing
	document.cookie = whatIAmWritingNow + "; " + document.cookie; */
	document.cookie = escape( cookieName ) + "=" + escape( cookieValue ) +
		( lifeTime ? ";expires=" + ( new Date( ( new Date() ).getTime() + ( 1000 * lifeTime ) ) ).toGMTString() : "" ) +
		( path ? ";path=" + path : "") + ( domain ? ";domain=" + domain : "") + 
		( isSecure ? ";secure" : "");
	//check if the cookie has been set/deleted as required
	if( lifeTime < 0 ) { if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return false; } return true; }
	if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return true; } return false;
}


function createCookie(name,value,days) {
     if (days) {
           var date = new Date();
           date.setTime(date.getTime()+(days*24*60*60*1000));
           var expires = "; expires="+date.toGMTString();
     }
     else var expires = "";
     document.cookie = name+"="+value+expires+"; path=/;domain=careerswales.com";
}

function readCookieA(name) {
     var nameEQ = name + "=";
     var ca = document.cookie.split(';');
     for(var i=0;i < ca.length;i++) {
           var c = ca[i];
           while (c.charAt(0)==' ') c = c.substring(1,c.length);
           if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
     }
     return null;
}

function eraseCookie(name) {
     createCookie(name,"",-1);
}


function FixAmaxus()
{
     var amaxusAsp = readCookieA("AMAX%5FCW%5FSHARED");

     if (amaxusAsp!=null)
     {
           eraseCookie("AMAX%5FCW%5FSHARED");
           createCookie("AMAX_CW_SHARED", amaxusAsp, null);
     }
}
        

//Need to pick up this size from the cookie if it is held in session
if (readCookie('textsize')=='normal'||readCookie('textsize')=='large'||readCookie('textsize')=='small')	{
	setActiveStyleSheet(readCookie('textsize'));
}
else	{
	setActiveStyleSheet('normal');
}
FixAmaxus();


//window.onload = FixAmaxus();

//  -->
