// changeImage function
function ChangeImage(ImageName, NewImage, Title, Directory)
{
if (document.images)
	{
// alert (ImageName + " - " + NewImage + " - " + Title + " - " + Directory);
	if (String (Directory) != "undefined")
		document[ImageName].src = Directory + "/" + NewImage;
	else
		document[ImageName].src = "images/" + NewImage;
	}

if (String (Title) != "undefined")
	window.status=Title;
else
	window.status=' ';
}

function ChangeImageBK(ImageName, NewImage, Directory)
{
		
		if (String (Directory) != "undefined")
			bkImage = "url(" + Directory + "/" + NewImage + ")";
		else
			bkImage = "url(/images/" + NewImage + ")";		

				
		if(document.layers) // browser="NN4"; 
			document.layers[ImageName].backgroundImage = bkImage;
		
		if(document.all) // browser="IE"; 
			document.all[ImageName].style.backgroundImage = bkImage;
		 	
		if(!document.all && document.getElementById) // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
			document.getElementById(ImageName).style.backgroundImage = bkImage;
}

function chgbk(id, newcolor)
{
	if(document.layers) // browser="NN4"; 
		document.layers[id].bgColor = newcolor; 
	
	if(document.all) // browser="IE"; 
		document.all[id].style.backgroundColor = newcolor; 
	
	if(!document.all && document.getElementById) // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
		document.getElementById(id).style.backgroundColor = newcolor; 
}

function chgBkgd(id, className)
{
	if(document.layers) // browser="NN4"; 
		document.layers[id].className = className; 
		
	if(document.all) // browser="IE"; 
		document.all[id].className = className; 
		
	if(!document.all && document.getElementById) // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
		document.getElementById(id).className = className; 
}

function chgLink(id, color)
{
	if(color=='y')
		newcolor = "#FBB71A";
	else if(color=='w')
		newcolor = "#FFFFFF";
	else if(color=='b')
		newcolor = "#0077CC";		
		
	if(document.layers) // browser="NN4"; 
		document.layers[id].color = newcolor; 
		
	if(document.all) // browser="IE"; 
		document.all[id].style.color = newcolor; 
		
	if(!document.all && document.getElementById) // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
		document.getElementById(id).style.color = newcolor; 
}

function chgDiv(id, text)
{
	if(document.layers) // browser="NN4"; 
		document.layers[id].innerHTML = text; 
		
	if(document.all) // browser="IE"; 
		document.all[id].innerHTML = text; 
		
	if(!document.all && document.getElementById) // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
		document.getElementById(id).innerHTML = text; 
}

function featureRoll(id, status, text)
{
	
	if (status == '1'){
		if(id == 'manage')
			ChangeImage('flbumper', 'bumper_right_icon_roll.gif', '', '/images/home');
			
		ChangeImage(id, 'icon_' + id + '_roll.gif', '', '/images/home');
		chgBkgd('bk1_' + id, 'w');
		chgBkgd('bk2_' + id, 'w');						
		chgDiv('textFeatured', text);
		chgLink(id + 'L', 'y');
		ChangeImageBK('textBK', 'sub_textarea_1.jpg', '/images/home');
	}
	else{
		if(id == 'manage')
			ChangeImage('flbumper', 'bumper_right_icon.gif', '', '/images/home');	
		
			
		ChangeImage(id, 'icon_' + id + '.gif', '', '/images/home');
		chgBkgd('bk1_' + id, 'r');		
		chgBkgd('bk2_' + id, 'r');		
		chgLink(id + 'L', 'w');
		ChangeImageBK('textBK', 'sub_textarea_0.jpg', '/images/home');
		chgDiv('textFeatured', '');
	}
}

function subfeatureRoll(id, status)
{	
	if (status == '0'){
		chgBkgd(id, 'w');
		chgLink(id + 'L', 'b');		
	}
	else{
		chgBkgd(id, 'r');
		chgLink(id + 'L', 'w');			
	}
}

// index dropdown url redirect
function openLoginWindow () {
	var accessForm = document.form_select;
	var optionIndex = accessForm.languages.selectedIndex;
	var langLink = accessForm.languages.options[optionIndex].value;
	if (langLink != null && langLink.length > 0) {
		window.open(langLink);
	}
}


function openPrintWindow (url) {
        window.open(url,"print","height=396,width=650,status=no,toolbar=no,directories=no,menubar=no,scrollbars=yes,location=no");
	return; 
}

function movieAction(movieName, movieAction) {

	dcsMultiTrack('DCS.dcsuri', 'flashtracking.ft', 'DCSext.Movie', movieName,  'DCSext.MovieAction', movieAction);
 
}

function popupWindow(filename,windowname,width,height)  
{
popup=window.open(filename,windowname,"width="+width+",height="+height+",resizable=yes,status=no,toolbar=yes,directories=no,menubar=yes,scrollbars=yes,location=no");
}

