// Javascript Mayfair Records

// variables

var base= "pix/nav_"
var nrm = new Array();
var omo = new Array();
var ocl = new Array();
var stuff = new Array('news','information','musicstreams','experience','merchandise','contact','links');
var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1));
var select = -1;
var name2 = "";
var temp = 0;


// pre-load part.

if (document.images)
{
	for (i=0;i<stuff.length;i++)
	{
		nrm[i] = new Image;
		nrm[i].src = base + stuff[i] + "_out.gif"
		omo[i] = new Image;
		omo[i].src = base + stuff[i] + "_over.gif";
		ocl[i] = new Image;
		ocl[i].src = base + stuff[i] + "_over.gif";

	}
}

// functions

function over(no)
{
	if (document.images && select != no)
	{
		document.images[stuff[no]].src = omo[no].src
	}
}

function out(no)
{
	if (document.images && select != no)
	{
		document.images[stuff[no]].src = nrm[no].src
	}
}

function clic(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = ocl[no].src
		temp = select;
		select = no;
		if (temp != -1) {out(temp)}
	}
}


// homepage mouseovers

var imga=new Image(); imga.src="pix/homeheader_home.gif";
var imgb=new Image(); imgb.src="pix/homeheader_information.gif";
var imgc=new Image(); imgc.src="pix/homeheader_musicstreams.gif";
var imgd=new Image(); imgd.src="pix/homeheader_experience.gif";
var imge=new Image(); imge.src="pix/homeheader_merchandise.gif";
var imgf=new Image(); imgf.src="pix/homeheader_contact.gif";
var imgg=new Image(); imgg.src="pix/homeheader_links.gif";
var imgh=new Image(); imgh.src="pix/homeheader_news.gif";
var imgi=new Image(); imgi.src="pix/homeheader_email.gif";

function doit(source) {
	if(document.getElementById('homeheader')) {
		document.getElementById('homeheader').style.backgroundImage='url('+source.src+')';
	}
}


// popup

function popitup(url)
{
	newwindow=window.open(url,'name','height=320,width=320,top=120,left=130');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup2(url)
{
	newwindow=window.open(url,'name2','height=230,width=230');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup3(url)
{
	newwindow=window.open(url,'name2','height=660,width=580');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup4(url)
{
	newwindow=window.open(url,'name4','height=320,width=520,top=120,left=130');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup5(url)
{
	newwindow=window.open(url,'name5','height=370,width=480,top=120,left=130');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup6(url)
{
	newwindow=window.open(url,'name6','height=548,width=960');
	if (window.focus) {newwindow.focus()}
	return false;
}

// sounds



// sticky menu

function setVariables() {
if (document.layers) {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else if (document.all){
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
else if (document.getElementById){
y="window.pageYOffset";
}
}
function checkLocation() {
object="menu";
yy=eval(y);
if (document.getElementById)
document.getElementById("menu").style.top=yy
else
eval(dS+object+sD+v+yy)
setTimeout("checkLocation()",10);
}


