<!--

function initZoom()
{
	// add onclick event for every a element with a
	// child element of img existing in the column2
	// div

	if ( document.getElementById('pop') )
	{
		var as,i,img
		as = document.getElementById('pop').getElementsByTagName('a');

		for ( i = 0; i < as.length; i++ )
		{
			img = as[i].firstChild.nodeName;

			//if ( img == 'IMG' )
			if ( as[i].getAttribute('rel') )
			{
				as[i].onclick = function(){ doZoom( this ); return false; }
			}
		}
	}
}

function doZoom( obj )
{
	if ( obj.getAttribute('rel') )
	{
		var title = obj.getAttribute('title');
		var dim = obj.getAttribute('rel').split('x');
		width = dim[0];
		height = parseInt(dim[1]) + 28;

		var g = window.open( '', 'title', 'width='+width+',height='+height+',left=20,top=20,scrollbars=no,location=no,status=no' );

		g.document.write('<html><head><title>'+title+'</title>');
		g.document.write('<meta http-equiv="pragma" content="no-cache">');
		g.document.write('<meta http-equiv="expires" content="-1">');
		g.document.write('<link rel="stylesheet" href="/css/p.css">');
		g.document.write('</head><body>');
		g.document.write('<a href="javascript:self.close();" title="Click to close."><img src="' + obj.href + '" /></a>' );
		g.document.write('<h2>'+title+'</h2>');
		g.document.write('</body></html>');
		g.document.close();

		return false;
	}
	else
	{
		return true;
	}
}

function clearBox( b )
{
	b.value = '';
}

function activate( id )
{
	if ( document.getElementById( id ) )
	{
		i = document.getElementById( id );
		i.style.background = '#D6D5C9';
		i.style.borderTop = '1px solid #fff';
		i.style.borderLeft = '1px solid #fff';
		i.style.borderBottom = '1px solid #000';
		i.style.borderRight = '1px solid #000';
		i.style.color = '#000';
		i.style.font = 'bold 10px Verdana, arial, helvetica, sans-serif';
		i.style.margin = '0';
		i.style.padding = '3px 0 2px 6px';
	}
	if ( document.getElementById('checkout') )
	{
		c = document.getElementById('checkout');
		c.style.display = 'none';
	}
}

function deactivate( id )
{
	if ( document.getElementById( id ) )
	{
		i = document.getElementById( id );
		i.style.display = 'none';
	}
}

function readMap()
{
	var map, i;

	// get array of map area tags
	map = document.getElementsByTagName('area');

	for ( i = 0; i < map.length; i++ )
	{
		//add onmouseover and onmouseout event functions
		map[i].onmouseover = function(){ swap( this ); };
		map[i].onmouseout = function(){ swap( this ); };
	}
}

function swap(o)
{
	var mapbg, id;

	//set id variable to the 'id' of the area on the map where the mouse is positioned
	id = o.id;

	//the master object where the image map is used in this case a clear gif with the id 'mapimg'
	mapbg = document.getElementById('mapimg');

	//if the className and the id match reset the class to the default state -or- shift the background image to the correct position by using the new class value
	if( id == mapbg.className )
	{
		mapbg.className='base';
	}
	else
	{
		mapbg.className=id;
	}
}

window.onload = function(e)
{
	initZoom();
	readMap();
}

//-->