
function hideThumbs() {
	curStyle = document.getElementById('rating_thumbs_holder').style.visibility;
//	alert(curStyle);
	if (curStyle=="visible"||curStyle=="") document.getElementById('rating_thumbs_holder').style.visibility = "hidden";
	else document.getElementById('rating_thumbs_holder').style.visibility = "visible";
}

function swapGraphic(layer,graphic) {
	//var img_host = 'http://www.vh1classic-d.mtvi.com';
    var img_root_directory = '';
	/*
    var classic_image = new Image;
    classic_image.src = img_host+graphic;
	classic_image.onload = function() {
		//alert('loaded');
		document.getElementById(layer).innerHTML = "<img src='"+classic_image.src+"' />";
	}
	
	classic_image.onerror = function() {
		//alert('error');
		//report an image error
		document.getElementById(layer).innerHTML = "<img src='"+classic_image.src+"' />";
	}
	*/
	document.getElementById(layer).innerHTML = "<img src='"+graphic+"' />";
}

var vh1classic_flashobj = {
	name 		: '',
	movieLoc 	: '',
	width 		: 0,
	height 		: 0,
	bgcolor 	: 000000,
	flashVars 	: 'xmlLoc=http://www.vh1.com/sitewide/data/xml/promos/cms_promo_feed.jhtml?areaName=classic_img_carousel',
	wmode 		: 'transparent',
	buffer 		: '',
	flashObj 	: {},
	setBuffer 	: function() {
		if (this.name == "false"){
			//this.name = "swf"+mediaList.length;
		}
		var buffer = "";
		buffer +=("<" + "OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"" + this.name + "\" ");
		buffer +=(" CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" "); 
		buffer +=(" WIDTH=" + this.width + " HEIGHT=" + this.height);
		buffer +=(" > ");	
		buffer +=(" <"+"PARAM NAME=MOVIE VALUE='" + this.movieLoc + "'> ");
		buffer +=(" <"+"PARAM NAME=PLAY VALUE='true'> ");
		buffer +=(" <"+"PARAM NAME=LOOP VALUE='true'> ");
		buffer +=(" <"+"PARAM NAME=bgcolor VALUE=#" + this.bgcolor + "> ");
		buffer +=(" <"+"PARAM NAME=QUALITY VALUE=high> ");
		// Flash Vars 
		buffer +=(" <"+"PARAM NAME=FlashVars VALUE='"+this.flashVars+"'> ");
		buffer +=(" <"+"PARAM NAME=MENU VALUE='" + this.menu + "'> ");
		// set tranparency
		buffer +=(" <"+"PARAM NAME=WMODE VALUE='" + this.wmode + "'>");
		buffer +=("<EMB"+"ED NAME=\"" + this.name + "\" SRC='" + this.movieLoc + "' ");
		buffer +=("FlashVars='" + this.flashVars + "' ");
		buffer +=(" WIDTH='" + this.width + "' HEIGHT='" + this.height + "' play=true ");
		buffer +=(" loop=true QUALITY=best ALIGN=TOP ");
		buffer +=(" BGCOLOR=#" + this.bgcolor + " ");
		buffer +=(" TYPE=application/x-shockwave-flash ");
		buffer +=(" wmode=" + this.wmode );
		buffer +=(" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">");
		buffer +=("</EMBED>");
		buffer +=("</OBJECT>");
		this.buffer = buffer;
	}, // end set
	
	flashwrite : function(){
		this.name 		= 'vh1classic_p1';
		this.movieLoc 	= '/sites/vh1classic/modules/carousel/classicpromo.swf';
		this.width 		= 458;
		this.height 	= 327;
		this.setBuffer();
		return document.write(this.buffer);
	},
	
	logowrite : function(){
		this.name 		= 'vh1classic_logo'
		this.movieLoc 	= '/sites/vh1classic/modules/navigation/classic_logo.swf';
		this.width 		= 200;
		this.height 	= 121;
		this.setBuffer();
		return document.write(this.buffer);
	}
}

function logoclick(){
	//alert('logo clicked');
	document.location.href = '/';

}

	var imagepath = '/img/';
	var listCount = 0;
	function drawNum(){
		listCount++;
		var imagename = 'number'+listCount+".gif";
		return document.write('<img src="'+imagepath+imagename+'" width="25" height="79" />');
	}		

	
	
function popRingToneOrder(downloadID) {
   rt = window.open("http://www.vh1.com/mobile/ringtones/order/instructions_ringtones.jhtml?downloadID="+downloadID,"rt","width=668,height=337")
}