/* Core Functions */

contactimg_over = newImage("/images/Btn_GreenContact-over.gif");
preloadFlag = true;

function addEvent( obj, type, fn ) {
 if ( obj.attachEvent ) {
	 obj['e'+type+fn] = fn;
	 obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
	 obj.attachEvent( 'on'+type, obj[type+fn] );
 } else
	 obj.addEventListener( type, fn, false );
}
function removeEvent( obj, type, fn ) {
 if ( obj.detachEvent ) {
	 obj.detachEvent( 'on'+type, obj[type+fn] );
	 obj[type+fn] = null;
 } else
	 obj.removeEventListener( type, fn, false );
}

/* Utility Functions */
function pop(url, name, scroll, width, height){
	var w = width;
	var h = height;
	var winl = (screen.width - w) /2 + 225;
	var wint = (screen.height - h) /2 - 150;
	remote = window.open(url,name,"scrollbars="+scroll+",width="+w+",height="+h+",top="+wint+",left="+winl+",resizable=no,status=no,location=no,toolbar=no,menubar=no");
   if (remote.opener == null) remote.opener = window;
   remote.opener.name = "opener";
}

/* Disallow Frameset Containment */
function breakOut() {
	if (self != top) {
		window.open("http://ceriusinterim.com/","_parent","scrollbars=yes,resizable=yes,status=yes,location=yes,toolbar=yes,menubar=yes");
	}
}
addEvent(window,"load",breakOut);

$(document).ready(function(){

$('#submit').hover(function(){
       $(this).attr('src', '/img/bttn-submit-over.gif');
}, function(){
       $(this).attr('src', '/img/bttn-submit-on.gif');
});

});


$(document).ready(function(){

$('#rss').hover(function(){
       $(this).attr('src', '/img/bttn-feed-over.gif');
}, function(){
       $(this).attr('src', '/img/bttn-feed-on.gif');
});

});

$(document).ready(function(){

$('.register').hover(function(){
       $(this).attr('src', '/img/bttn-register-over.gif');
}, function(){
       $(this).attr('src', '/img/bttn-register-on.gif');
});

});


function newImage(arg) {
//	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
//	}
}

function changeImages() {
//	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
//	}
}


var preloadFlag = false;
function preloadImages() {	
//	if (document.images) {
		contactimg_over = newImage("/images/Btn_GreenContact-over.gif");
		preloadFlag = true;
//	}
}