function openWindow(URL,width,height) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(" + URL + ", '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height+",left="+((screen.width - width)/2)+",top="+((screen.height - height)/2)+"');");return false;}
function isEmail(address) {var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(reg.test(address) == false) {return false;} else {return true;}}
function swapImg(element, source) {document.getElementById(element).src = source;return false;}

$(document).ready(function() {
    browserDetection();
    fixIE6alphaTransparency();
    $("#news").newsTicker();
	attachSwf();
	$("#q").focus(function() {
		if ($(this).val() == 'Search') {
			$(this).val('');
		}
	});
	$("#q").blur(function() {
		if ($(this).val() == '') {
			$(this).val('Search');
		}
	});
});

function attachSwf() {
    if ($('#media-slide').length > 0) {
        flashembed('media-slide', {src: "resources/media/slide.swf", wmode:'transparent'});
    }
}
