//************************************************************
//initPage
//************************************************************
function initPage(strURL, strButton) {
	if (top == self) {
	    parent.location.replace(strURL);
	}
	else if (strButton != '') {
		parent.window.buttonClicked(strButton);
	}
}
//************************************************************
//************************************************************

//************************************************************
//showAdSense
//************************************************************
function showAdSense(blnShowAdsense, strPathHorizontal, strPathVertical) {
	if (blnShowAdsense) {
		if (document.body.offsetWidth >= 1016) {
			document.getElementById('AdSenseReferralsVertical').innerHTML = "<iframe src='" + strPathVertical + "' allowtransparency=true width=135 height=600 frameborder=0 marginwidth=0 marginheight=0 vspace=0 hspace=0 scrolling=no></iframe>";
		}
		else {
			document.getElementById('AdSenseReferralsHorizontal').innerHTML = "<iframe src='" + strPathHorizontal + "' allowtransparency=true width=640 height=40 frameborder=0 marginwidth=0 marginheight=0 vspace=0 hspace=0 scrolling=no align=center></iframe>";
		}
	}
}
//************************************************************
//************************************************************

//************************************************************
//showHide
//************************************************************
var head = getCookie('showHide');

if (head == null) {
	head = 'none';
}

function showHide(header) {
	var head = header.style;
	if (head.display == "none") {
		setCookie('showHide', ' ', 30, '/', '', '');
		head.display = "";
	}
	else {
		setCookie('showHide', 'none', 30, '/', '', '');
		head.display = "none";
	}
}
//************************************************************
//************************************************************

//************************************************************
//Validate Email 
//************************************************************
function isValidEmail(strEmail, strAlert){
	validRegExp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (validRegExp.test(strEmail)) {
		return true; 
	}
	else {
		alert(strAlert);
		return false;
	}
}
//************************************************************
//************************************************************

//************************************************************
//Add to favorites
//************************************************************
function addBookmark(){
	if (document.all) {
		window.external.AddFavorite(location.href, document.title);
	}
//	else if (window.sidebar) {
//		window.sidebar.addPanel(document.title, location.href, "");
//	}
}
//************************************************************
//************************************************************
