/*-------------------------------------------------------------------------*/
function init() {
	var preloaded = new Array();
	function preload_images() {
		for (var i = 0; i < arguments.length; i++){
			preloaded[i] = document.createElement('img');
			preloaded[i].setAttribute('src',arguments[i]);
		};
	};
	preload_images(
		'/favicon.ico',
		'/img/submit-button-over.gif',
		'/img/search-button-over.gif',
		'/img/login-button-over.gif',
		'/img/signup-button-over.gif',
		'/img/next-button-over.gif',
		'/img/submit-button-grey-over.gif',
		'/img/remove-button-over.gif',
		'/img/submit-button-purple-over.gif',
		'/img/back-button-over.gif',
		'/img/update-details-button-over.gif'
	);
}
window.addEvent('domready', init);
/*-------------------------------------------------------------------------*/
function removeCopy(){
	var m = $('map');
	if(m){
		var childDivs = m.getChildren();
		childDivs[1].style.display ="none";
	}
}
window.addEvent('load', removeCopy);
/*-------------------------------------------------------------------------*/
function styleSearchForm() {
	if($('send-button')){
		$('send-button').addEvent('mouseover',function(){this.src='/img/submit-button-over.gif'});
		$('send-button').addEvent('mouseout', function(){this.src='/img/submit-button.gif'});
	}
	if($('search-button')){
		$('search-button').addEvent('mouseover',function(){this.src='/img/search-button-over.gif'});
		$('search-button').addEvent('mouseout', function(){this.src='/img/search-button.gif'});
	}
	if($('login-button')){
		$('login-button').addEvent('mouseover',function(){this.src='/img/login-button-over.gif'});
		$('login-button').addEvent('mouseout', function(){this.src='/img/login-button.gif'});
	}
	if($('signup-button')){
		$('signup-button').addEvent('mouseover',function(){this.src='/img/signup-button-over.gif'});
		$('signup-button').addEvent('mouseout', function(){this.src='/img/signup-button.gif'});
	}
	if($('next-button')){
		$('next-button').addEvent('mouseover',function(){this.src='/img/next-button-over.gif'});
		$('next-button').addEvent('mouseout', function(){this.src='/img/next-button.gif'});
	}
	if($('signin-button')){
		$('signin-button').addEvent('mouseover',function(){this.src='/img/signin-button-over.gif'});
		$('signin-button').addEvent('mouseout', function(){this.src='/img/signin-button.gif'});
	}
	if($('submit-button-grey')){
		$('submit-button-grey').addEvent('mouseover',function(){this.src='/img/submit-button-grey-over.gif'});
		$('submit-button-grey').addEvent('mouseout', function(){this.src='/img/submit-button-grey.gif'});
	}
	if($('update-details-button')){
		$('update-details-button').addEvent('mouseover',function(){this.src='/img/update-details-button-over.gif'});
		$('update-details-button').addEvent('mouseout', function(){this.src='/img/update-details-button.gif'});
	}
}
window.addEvent('load', styleSearchForm);
/*-------------------------------------------------------------------------*/
function generateEmailLink(n,d) {
	var username = n;
	var hostname = d;
	var linktext = n+"@"+d;
	document.write("<a hr"+"ef=" + "mai"+"l" + "to:" + username +
	"@" + hostname + ">" + linktext + "</"+"a>")
}
/*-------------------------------------------------------------------------*/
var font = {
  src: '/inc/flash/futura.swf'
};

sIFR.delayCSS  = false;
sIFR.activate(font);

sIFR.replace(font, {
    selector: '#right-content .floater h2.right'
    ,css: {
      '.sIFR-root': { 'color': '#FF7900', 'font-weight': 'normal', 'text-align': 'right' }
    }
		,wmode: 'transparent'
  });
sIFR.replace(font, {
    selector: '#left-content h2'
    ,css: {
      '.sIFR-root': { 'color': '#380982', 'font-weight': 'normal' }
    }
		,wmode: 'transparent'
  });
sIFR.replace(font, {
    selector: '#right-content h2'
    ,css: {
      '.sIFR-root': { 'color': '#FF7900', 'font-weight': 'normal' }
    }
		,wmode: 'transparent'
  });