/*****************************
* navigation                 *
*                            *
* Last update: 12 May, 2002. *
*                            *
******************************/

//*******
// news *
//*******
function newsload() {
document.frames['news'].location.href="news.php";
}

//********
// music *
//********
function musicload() {
document.frames['musiciframe'].location.href="music.php";
}

//*********
// photos *
//*********
function photosload() {
document.frames['photos'].location.href="photos.php";
}

//***********
// messages *
//***********
function messagesload() {
document.frames['messages'].location.href="messages.php";
}

//*******
// help *
//*******
function helpload() {
document.frames['help'].location.href="help.php";
}

//********
// biogs *
//********
function biogsload() {
document.frames['biogs'].location.href="biogs.htm";
}

//*******
// frou *
//*******
function frouload() {
document.frames['frou'].location.href="frou.htm";
}

//*********
// random *
//*********
function randomload() {
document.frames['random'].location.href="random.htm";
}



function submitit(){
var EmailAddress=document.reg_form.EmailAddress.value;
if (EmailAddress==""){
alert("Please enter your email address.")
document.reg_form.EmailAddress.focus()
return false
	}
	if (EmailAddress.indexOf('@', 0) == -1 || EmailAddress.indexOf('.', 0) == -1){ alert("Sorry, that email address is incorrect. Please check for mistakes.");
		document.reg_form.EmailAddress.focus()
		return false
		}		
	var DOB_Y=document.reg_form.DOB_Y.value;
if (DOB_Y=="" || DOB_Y=="1" || DOB_Y==" "){
alert("Please enter your date of birth.")
document.reg_form.DOB_Y.focus()
return false
	}	
	var DOB_D=document.reg_form.DOB_D.value;
if (DOB_D=="" || DOB_D=="DD" || DOB_D==" "){
alert("Please enter your date of birth.")
document.reg_form.DOB_D.focus()
return false
	}
	var user_country=document.reg_form.user_country.value;
if (user_country=="" || user_country=="none" || user_country==" "){
alert("Please enter your country of residence.")
document.reg_form.user_country.focus()
return false
	}	
	var FirstName=document.reg_form.FirstName.value;
if (FirstName==""){
alert("Please enter your first name.")
document.reg_form.FirstName.focus()
return false
	}

	var LastName=document.reg_form.LastName.value;
if (LastName==""){
alert("Please enter your last name.")
document.reg_form.LastName.focus()
return false
	}
}
function soopaPopSetup() {
	var a;
	for (var i = 0; (a = document.links[i]); i++) {
		if (a.target && a.target.indexOf("_soopaPop") == 0) {
			a.onclick = soopaPop;
		}
	}
}
function soopaPop() {
	var a = this.target.split(":");
	var sFeatures = a[1];
	window.open(this.href, a.length > 2 ? a[2] : String((new Date()).getTime()), sFeatures);
	return false;
	alert("hi")
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function dd_open(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

/*****************************
* frameslider code           *
*                            *
* Last update: 12 May, 2002. *
*                            *
******************************/

var currxPos = 1
var newxPos = 1
var xDistance = 1

var curryPos = 1
var newyPos = 1
var yDistance = 1

function scrollH(newxPos){
        
        if(newxPos > currxPos){
        
                xDistance = newxPos - currxPos
        
                while (xDistance > 0){
                        xDistance = Math.round(xDistance - 10)
                        currxPos=(newxPos-xDistance)
                        self.scroll(currxPos, curryPos);
                }
                currxPos = (newxPos-xDistance)
        }
        else{
        
                xDistance = currxPos - newxPos
        
                while (xDistance > 0){
                        xDistance = Math.round(xDistance - 10)
                        currxPos=(newxPos+xDistance)
                        self.scroll(currxPos, curryPos);
                }
                currxPos = (newxPos+xDistance)
        }
}


function scrollV(newyPos){
        
        if(newyPos > curryPos){
        
                yDistance = newyPos - curryPos
        
                while (yDistance > 0){
                        yDistance = Math.round(yDistance - 10)
                        curryPos=(newyPos-yDistance)
                        self.scroll(currxPos,curryPos);
                }
                curryPos = (newyPos-yDistance)
        }
        else{
        
                yDistance = curryPos - newyPos
        
                while (yDistance > 0){
                        yDistance = Math.round(yDistance - 10)
                        curryPos=(newyPos+yDistance)
                        self.scroll(currxPos,curryPos);
                }
                curryPos = (newyPos+yDistance)
        }
}

function reSet(){
        //window.innerWidth=780
        //window.innerHeight=480
        self.scroll(currxPos, curryPos);
}

function Shake(){

        // store org position
        var strX = self.pageX
        var strY = self.pageY
        
        self.moveBy(-15,0);
        self.moveBy(0,15);
        self.moveBy(0,-15);
        self.moveBy(15,0);
        
        self.moveBy(-10,0);
        self.moveBy(0,10);
        self.moveBy(0,-10);
        self.moveBy(10,0);
        
        self.moveBy(-5,0);
        self.moveBy(0,5);
        self.moveBy(0,-5);
        self.moveBy(5,0);
        
        //restore to org position
        self.moveTo(strX,strY)
}
 
