<!--
function init(id1, id2)
{
	// Init submenus
	var cell = getObject(id1)
	var menu = getObject(id2)
	menu.style.left = findPosX(cell)
	menu.style.top = findPosY(cell) + cell.clientHeight
}

function getObject(id)
{
	// NN4+
    if ( document.layers )
       return layers[divId]
    // Gecko (NN6) & IE5+
    else if ( document.getElementById )
        return document.getElementById(id)
    // IE4
    else //if ( document.all )
    	return document.all[id]
}

function getObject2(document, id)
{
	// NN4+
    if ( document.layers )
       return layers[divId]
    // Gecko (NN6) & IE5+
    else if ( document.getElementById )
        return document.getElementById(id)
    // IE4
    else //if ( document.all )
    	return document.all[id]
}

function setVisible(id, state)
{
	var obj = getObject(id)
	// NN4+
    if ( document.layers )
       obj.visibility = state ? "show" : "hide"
    // All others
    else
        obj.style.visibility = state ? "visible" : "hidden"
}

function findPosX(obj)
{
	var curleft = 0
	if ( obj.offsetParent )
		while ( obj.offsetParent )
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent
		}
	else if ( obj.x )
		curleft += obj.x
	return curleft
}

function findPosY(obj)
{
	var curtop = 0
	if ( obj.offsetParent )
		while ( obj.offsetParent )
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent
		}
	else if ( obj.y )
		curtop += obj.y
	return curtop
}

function play()
{
	// Enable audio auto-play
	// return
	if ( getSpy() && navigator.platform == "Win32" && document.cookie.indexOf("killplay") == -1 )
	{
		var clip = getObject("clip")
		var title = getObject("title")
		var titleText = getTitleText()
		if ( titleText && titleText != "" )
		{
			clip.innerHTML = "<EMBED id='player' TYPE='application/x-mplayer2' src='Random.aspx?tid=" + getTidText() + "&music.asx' height=0 width=0>"
			if ( getObject("player") )
			{
				if ( navigator.appName == "Microsoft Internet Explorer" )
				{
					var width
					if ( title.offsetWidth && title.offsetWidth > 0 )
						width = title.offsetWidth
					else
						width = 250
					title.innerHTML = "<marquee direction=left behavior=scroll scrollamount=4 scrolldelay=10 style='width: " + width + "'>Now Playing: " + titleText + "</marquee>"
				}
				else
					title.innerHTML = "Now Playing: " + titleText
			}
		}
	}
}

function killplay(url)
{
	document.cookie = "killplay=1"
	
	if ( document.cookie.indexOf("Quality") == -1 )
		if ( navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" )
		{
			var date = new Date()
			date.setFullYear(date.getFullYear() + 1)
			document.cookie = "Quality=high; expires=" + date.toGMTString()
		}
		else	
		{
			var date = new Date()
			date.setFullYear(date.getFullYear() + 1)
			document.cookie = "Quality=low; expires=" + date.toGMTString()
			//choose()
		}
	
	if ( navigator.platform == "Win32" )
	{
		var clip = getObject("clip")
		if ( clip )
		{
			clip.innerHTML = ""
			var title = getObject("title")
			title.innerHTML = "Inspired by Paul van Dyk and Mozart"
		}
	}
}

function choose()
{
	document.cookie = "Quality=low; expires=Fri, 31 Dec 1999"
	if ( window.showModalDialog )
		quality = window.showModalDialog("ChooseQuality.htm", "", "center:1; status:0; dialogWidth:300px; dialogHeight:180px; scroll:0")
	else
		if ( confirm("Use Windows Media Streaming? (recommended for best quality)") )
			quality = "high"
		else
			quality = "low"
	var date = new Date()
	date.setFullYear(date.getFullYear() + 1)
	document.cookie = "Quality=" + quality + "; expires=" + date.toGMTString()
	if ( getSpy() )
		spy.location.href = "Spy.aspx?Quality=" + quality
	else
		window.location.href = window.location.href
}

function getSpy()
{
	if ( navigator.appName == "Microsoft Internet Explorer" )
		return getObject("spy")
	else
		return spy
}

function show(url)
{
	var wnd = window.open(url,'help','location=0,status=0,menubar=0,toolbar=0,width=450,height=320,resizable=1,scrollbars=1,left='+(screen.width-450)/2+',top='+(screen.height-320)/2)
	wnd.focus()
}

function show2(url)
{
	var wnd = window.open(url,'help','location=0,status=0,menubar=0,toolbar=0,width=800,height=600,resizable=1,scrollbars=1,left='+(screen.width-800)/2+',top='+(screen.height-600)/2)
	wnd.focus()
}

function cart(url)
{
	//document.cookie = "reload=1"
	//var wnd = window.open(url,'paypal','location=0,status=0,menubar=0,toolbar=0,width=800,height=600,resizable=1,scrollbars=1,left='+(screen.width-800)/2+',top='+(screen.height-800)/2)
	//wnd.focus()
	window.location.href=url
}

var timerID, N = 0, step = 2
function startSpecial()
{
	if ( document.cookie.indexOf("killplay") != -1 ) killplay()
	var anchor = getObject("anchor")
	var sale = getObject("sale")
	sale.style.left = findPosX(anchor) + (anchor.clientWidth - sale.clientWidth)/2
	sale.style.top = findPosY(anchor) + (anchor.clientHeight - sale.clientHeight)/2
	sale.style.visibility = "visible";
	if ( navigator.appName == "Microsoft Internet Explorer" )
	{
		sale.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=0); progid:DXImageTransform.Microsoft.Shadow(color='#222222', Direction=135, Strength=4);"
		timerID = setInterval("timerSpecial()", 20)
	}
}
function getSaleHTML()
{
	var spysale = spy.sale ? spy.sale : getObject2(spy.document, "sale")
	if ( spysale )	
		return spysale.innerHTML
	else
		return ""
}
function getTitleText()
{
	var spytitle = spy.title ? spy.title : getObject2(spy.document, "title")
	if ( spytitle )
		return spytitle.innerHTML
	else
		return ""
}
function getTidText()
{
	var spytid = spy.tid ? spy.tid : getObject2(spy.document, "tid")
	return spytid.innerHTML
}
function timerSpecial()
{
	var sale = getObject("sale")
    N += step
    sale.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + N + "); progid:DXImageTransform.Microsoft.Shadow(color='#222222', Direction=135, Strength=4);"
    if ( N >= 100 )
    {
		//step = -10
		clearInterval(timerID)
		//timerID = setTimeout("timerSpecial()", 10000)
    }
    /*else if ( N == 90 && step < 0 )
    {
		clearInterval(timerID)
		timerID = setInterval("timerSpecial()", 20)
    }
    else if ( N <= 0 )
    {
		clearInterval(timerID)
	    sale.style.visibility = "hidden"
	    sale.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100); progid:DXImageTransform.Microsoft.Shadow(color='#222222', Direction=135, Strength=4);"
	}*/
}
function showSpecial()
{
	var sale = getObject("sale")
	var anchor = getObject("anchor")
	var left = findPosX(anchor) + (anchor.clientWidth - sale.clientWidth)/2
    sale.style.left = left > 0 ? left : 0
    var top = findPosY(anchor) + (anchor.clientHeight - sale.clientHeight)/2
    sale.style.top = top > 0 ? top : 0
    if ( sale.style.top < 0 ) sale.style.top = 0
   	sale.style.visibility = "visible"
}
function hideSpecial()
{
	var sale = getObject("sale")
    sale.style.visibility = "hidden"
}

function h(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/buysong2.gif'
}
function h2(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/buysong.gif'
}
function a(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/buyalbum2.gif'
}
function a2(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/buyalbum.gif'
}
function b(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/downloadall2.gif'
}
function b2(obj)
{
	if ( obj.firstChild.src.indexOf("selected") == -1 )
		obj.firstChild.src='images/downloadall.gif'
}
function d(obj)
{
	obj.firstChild.src='images/buycd2.gif'
}
function d2(obj)
{
	obj.firstChild.src='images/buycd.gif'
}
function p(obj)
{
	obj.firstChild.src='images/play2.gif'
}
function p2(obj)
{
	obj.firstChild.src='images/play.gif'
}
function buy(obj)
{
	obj.firstChild.src='images/buy2.gif'
}
function buy2(obj)
{
	obj.firstChild.src='images/buy.gif'
}
function q(obj)
{
	obj.firstChild.src='images/playalbum2.gif'
}
function q2(obj)
{
	obj.firstChild.src='images/playalbum.gif'
}
function r(obj)
{
	if ( !obj["fixed"] && obj["store"] )
	{
		obj.src=obj["store"]
	}
}
function c(obj, id)
{
	if ( !obj["fixed"] )
	{
		obj["fixed"]=1
		if ( event.offsetX > 51 ) score=5
		else if ( event.offsetX > 38 ) score=4
		else if ( event.offsetX > 25 ) score=3
		else if ( event.offsetX > 12 ) score=2
		else score=1
		RatingFrame.location.href="Download.aspx?TrackID=" + id + "&Score=" + score
	}
}
function t(obj)
{
	if ( !obj["fixed"] )
	{
		if ( !obj["store"] ) obj["store"]=obj.src
		if ( event.offsetX > 51 ) obj.src="images/y5.gif"
		else if ( event.offsetX > 38 ) obj.src="images/y4.gif"
		else if ( event.offsetX > 25 ) obj.src="images/y3.gif"
		else if ( event.offsetX > 12 ) obj.src="images/y2.gif"
		else obj.src="images/y1.gif"
	}
}
function toggle(obj1, obj2)
{
	var layer1 = getObject(obj1)
	var layer2 = getObject(obj2)
	if ( layer1.innerHTML == "<br>" || layer1.innerHTML == "<BR>")
		layer1.innerHTML = layer2.innerHTML
	else
		layer1.innerHTML = "<br>"
}

function initpage()
{
	/*if ( window.name != "main" ) */window.name = "main"
	var loc = escape(window.location.href)
	if ( loc.indexOf("asp") == -1 )
	{
		var frm = getObject("frm")
		frm.innerHTML = "<iframe name='spy' src='spy.aspx' width=0 height=0 style='visibility:hidden' onload='play()'></iframe>"
	}
	var images = new Array("about2.jpg", "bullet2.jpg", "buyalbum2.gif", "buycd2.gif", "buycd2.jpg",
		"buysong2.gif", "downloadall2.gif", "music2.jpg", "mystery2.jpg", "play2.gif", "y1.gif",
		"y2.gif", "y3.gif", "y4.gif", "y5.gif")
	var img = new Array(images.length)
	for ( i = 0; i < images.length; i++ )
	{
		img[i] = new Image()
		img[i].src = "images/" + images[i]
	}
}

function initpage2()
{
	var loc = escape(window.location.href)
	if ( loc.indexOf("aspx") == -1 )
	{
		var frm = getObject("frm")
		frm.innerHTML = "<iframe name='spy' src='spy.aspx' width=0 height=0 style='visibility:hidden' onload='play()'></iframe>"
	}
}
function fixlinks()
{
	if ( document.getElementsByTagName )
	{
		var links = document.getElementsByTagName("A")
		if ( links )
		{
			var customerid = ""
			var pos = document.cookie.indexOf("CustomerID=")
			if ( pos > -1 )
			{
				customerid = document.cookie.substring(pos + 11) + ";"
				customerid = customerid.split(";")
				if ( customerid.length > 0 )
					customerid = customerid[0]
			}
			
			var pls
			if ( document.cookie.indexOf("Quality=high") > -1 || (document.cookie.indexOf("Quality") == -1 &&
				navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" ) )
				pls = "&file=UltraMax.asx"
			else
				pls = "&file=UltraMax.m3u"
		
			for ( i = 0; i < links.length; i++ )
				if ( links[i].href )
				{
					var url = links[i].href.toLowerCase()
					if ( customerid != "" )
					{
						if ( url.indexOf("cid") == -1 )
						{
							if ( url.indexOf("downloadfile.aspx") > -1 )
								links[i].href += "&cid=" + customerid
							else
								if ( url.indexOf("cart.aspx") > -1 )
									if ( url.indexOf("?") > -1 )
										links[i].href += "&cid=" + customerid
									else
										links[i].href += "?cid=" + customerid
						}
					}
					if ( url.indexOf("downloadfile.aspx") > -1 && url.indexOf("&file") == -1 )
						links[i].href += pls
				}
		}
	}
}
function special()
{
	/*if ( document.cookie.indexOf("killplay") == -1 )
	{
		killplay()
		window.open('downloadfile.aspx?AlbumID=0','player','location=0,status=0,menubar=0,toolbar=0,width=100,height=100,resizable=1,scrollbars=0')
		window.focus()
		//setTimeout("window.location.href='DownloadFile.aspx?AlbumID=0'",1000)
	}*/
}
function unload()
{
	if ( window.opener )
		if ( document.cookie.indexOf("special") == -1 )
		{
			window.opener.location.href = "Special.aspx"
			document.cookie = "special=1"
		}
}
function initpage2()
{
	var images = new Array("buyalbum2.gif", "buycd2.gif", "buysong2.gif", "play2.gif", "y1.gif",
		"y2.gif", "y3.gif", "y4.gif", "y5.gif")
	var img = new Array(images.length)
	for ( i = 0; i < images.length; i++ )
	{
		img[i] = new Image()
		img[i].src = "images/" + images[i]
	}
}
function bookmark(url,title)
{
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}
function startShow()
{
	timerID = setInterval("showLayers()", 20)
}
function showLayers()
{
	var player = getObject("FlashPlayer")
	var text = getObject("Text")
    N += step
    player.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + N + ");"
    text.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + N + ");"
    if ( N >= 100 )
		clearInterval(timerID)

}
var slowScrollY = 0, deltaY, scrollTimerID, slowScrollSpeed = 10
function SlowScroll()
{
	deltaY = 410
	scrollTimerID = setInterval("DoScroll()",slowScrollSpeed)
}
function DoScroll()
{
	slowScrollY += deltaY/(1000/slowScrollSpeed)
	window.scroll(0, slowScrollY)
	if ( slowScrollY >= deltaY ) clearInterval(scrollTimerID)
}
function StopSlowScroll()
{
	var x, y
	// all except Explorer
	if (window['pageYOffset'] != undefined)
	{
	    y = window.pageYOffset;
	}
	// Explorer 6 Strict
	else if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 6)
	{
	    x = document.documentElement.scrollLeft;
	    y = document.documentElement.scrollTop;
	}
	// all other Explorers
	else if (document.body)
	{
	    x = document.body.scrollLeft;
	    y = document.body.scrollTop;
	}
	if ( Math.abs(y - slowScrollY) > 10 ) clearInterval(scrollTimerID)
}
function openNewWindow(URLtoOpen, windowName) { newWindow=window.open(URLtoOpen, windowName); }
function Special() { if ( window.opener ) window.opener.location.href = "/Special.aspx" }
function Maximize() { window.moveTo(0,0); window.resizeTo(screen.width, screen.height) }
-->
