function addmovie()
{
	createMovieObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					900, 
					550, 
					'flash/movie.swf');
}

function createMovieObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("container").innerhtml = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}

function addheadermovie()
{
	createheaderMovieObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					900, 
					110, 
					'flash/movie.header.swf');
}

function createheaderMovieObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("addheadermovie").innerhtml = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}

function addfootermovie()
{
	createfooterMovieObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					900, 
					50, 
					'/flash/movie.footer.swf');
}

function createfooterMovieObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("addfootermovie").innerhtml = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}
function addlogomovie()
{
	createlogoMovieObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					250, 
					104, 
					'/flash/logo.swf');
}

function createlogoMovieObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("logo").innerhtml = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}
function addLocationMap()
{
	createLocationMapObj('flashobj', 
					'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000', 
					'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0', 
					850, 
					419, 
					'/flash/locationMap.swf');
}

function createLocationMapObj(id, classid, codebase, width, height, movievalue)
{
	document.getElementById("location_map_image").innerhtml = "<object id='" + id 
													+ "' classid='" + classid 
													+ "' codebase='" + codebase
													+ "' width='" + width 
													+ "' height='" + height
													+ "' VIEWASTEXT><param name='movie' value='" + movievalue
													+ "'><param name='quality' value='high'><embed src='" + movievalue
													+ "' width='" + width
													+ "' height='" + height
													+ "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
}

function show(div,items)
{
	//alert(div);
	div.style.display = 'block';
	var otherdiv;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			otherdiv=document.getElementById("div" + i);
		else
			otherdiv=document.all("div"+i);
		
		if (otherdiv!=div)
		{
			otherdiv.aselected="false";
			hide(otherdiv);
		}
	}
	
}
// --- START Image Swapping Functions NO.1 -- //

//here you place the ids of every element you want.
var ids=new Array('a1','a2');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids1.length;i++){
		hidediv(ids1[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
// --- END Image Swapping Functions NO.1 -- //

// --- START Image Swapping Functions NO.2 -- //

function switchid2(descid,imgid){	
	hideallids2();
	showdiv2(descid);
	showdiv2(imgid);	
}

function hideallids2(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids2.length;i++){
		hidediv2(ids2[i]);
	}		  
	for (var i=0;i<descs.length;i++){
		hidediv2(descs[i]);
	}		  

}

  
  function hidediv2(id) {
	//safe function to hide an element with a specified id
	//if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	//}
	//else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		//else { // IE 4
			//document.all.id.style.display = 'none';
		//}
	//}
}

function showdiv2(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

// --- END Image Swapping Functions NO.2 -- //

// --- START Image Swapping Functions NO.3 -- //
function imgOver(img)
{
	img.src = 'images/' + img.name + '_over.gif'; 
	//img.style.cursor = 'hand'; 
	img.style.cursor = 'pointer';
}	

function imgOut(img)
{
	if (img.aselected == "true")
		return false;
	else
	img.src = 'images/' + img.name + '.gif'; img.style.cursor = 'default'; img.style.cursor = 'default';
}


function imgOn(img,proj)
{
	img.src = 'images/' + img.name + '_over.gif'; 
	//img.style.cursor = 'hand'; 
	img.style.cursor = 'pointer';
	img.aselected= "true";
	var otherimg;
	for (var i=1; i<50; i++)
	{
		if (document.getElementById)
		{
			otherimg=document.getElementById(proj + "0" + i);
		}
		else
		{
			otherimg=document.all(proj + i);
		}
		if (otherimg!=img)
		{
			if (otherimg)
			{
				otherimg.aselected="false";
				imgOff(otherimg);
			}
		}
		
	}
}

function imgOff(img)
{
	img.src = 'images/' + img.name + '.gif';	img.style.cursor = 'default'; 	img.style.cursor = 'default'; 

	
}

// --- END Image Swapping Functions NO.3 -- //


//-------------------------------------------------