

function MakeHomepage(){
	oHomePage.setHomePage("http://www.da-haps.com/");
}

function openRadioPopup(){ 
	day = new Date(); 
	id = day.getTime();
	eval('page' + id + ' = window.open("templates/subSilver/radio.php", "' + id + '", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300");');
} 

var startColor = "#ffff00";
var endColor = "#ffffff";
window.status = "Da Haps :: {PAGE_TITLE} [ {TOP_USERNAME} ]";
var AMOUNT = 2; // distance to scroll for each time
var TIME = 5; // milliseconds  
var timer = null;  
function scrollIt(v){  
	var direction=v?1:-1;  
	var distance=AMOUNT*direction;  
	window.scrollBy(0,distance);  
}  
function down(v){ 
	if(timer){ 
		clearInterval(timer); timer=null; 
	}  
  	if(v)timer=setInterval("scrollIt(true)",TIME);
}  

function notes(){ 
	window.open("notes.php", "_notes", "width=800, height=600, scrollbars, resizable=yes");
} 

function tour(){ 
 	window.open("tour.php", "_tour", "width=800, height=600, scrollbars, resizable=yes");
}



var win = null;
function Gk_PopTart(mypage,myname,w,h,scroll){
  	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  	settings = 'height='+h+',width='+w+', top='+TopPosition+', left='+LeftPosition+', scrollbars='+scroll+', resizable';
  	win = window.open(mypage, myname, settings);
}
function Trophy_Popup(mypage,myname,w,h,scroll){
  	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  	settings = 'height='+h+',width='+w+', top='+TopPosition+', left='+LeftPosition+', scrollbars='+scroll+', resizable';
  	win = window.open(mypage, myname, settings);
}



<!------------------------ Disable Right Click ----------------------->
/*
var msg="Copyright WARNING!! : All content and images are copyright Da Haps and their original authors. If you would like to obtain a copy of an image please contact Management.";

function disableIE() {
	if (document.all) {alert(msg);return false;}
}
function disableNS(e) {
  if (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {alert(msg);return false;}
  }
}
if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
} else {
  document.onmouseup=disableNS;document.oncontextmenu=disableIE;
}
document.oncontextmenu=new Function("alert(msg);return false");
*/

var startColor = "#ffff00";
var endColor = "#ffffff";

// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version

var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
                && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
                && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;

var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);


function checkNEmail(form) {
	if (isBlank(form.email.value) || isBlank(form.name.value) || !isEmailValid(form.email.value) ) 
	{
		alert("Please enter a valid Name and  Email Address .\nThe email or name you have typed in does not appear to be valid.");
		form.email.focus();
		return false;
	}
	}

function checkEmail(form) {
	if (isBlank(form.email.value) || !isEmailValid(form.email.value) ) {
		alert("Please enter a valid Email Address.\nThe email you have typed in does not appear to be valid.");
		form.email.focus();
		return false;
	}
return true;

}

function isBlank(fieldValue) {
	var blankSpaces = / /g;
	fieldValue = fieldValue.replace(blankSpaces, "");
	return (fieldValue == "") ? true : false;
}

function isEmailValid(fieldValue) {
	var emailFilter = /^.+@.+\..{2,4}$/;
	var atSignFound = 0;
	for (var i = 0; i <= fieldValue.length; i++)
		if ( fieldValue.charAt(i) == "@" )
			atSignFound++;
	if ( atSignFound > 1 )
		return false;
	else
		return ( emailFilter.test(fieldValue) && !doesEmailHaveInvalidChar(fieldValue) ) ? true : false;
}

function doesEmailHaveInvalidChar(fieldValue) {
	var illegalChars = /[\(\)\<\>\,\;\:\\\/\"\[\] ]/;
	return ( illegalChars.test(fieldValue) ) ? true : false;
}
