//---------------------------------------------------------------------------------------------------------
//	DHTML JavaScript (ver 2.3)
//---------------------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------------------
//	Image swap
//-------------------------------------------------------------------------------------------------------
function swapImg(id,img)
{
	if( document.getElementById)
	{
		obj	= document.getElementById(id);
		obj.setAttribute( 'src', img );
	}
}

//---------------------------------------------------------------------------------------------------------
//	Show offers (on click shows div layer)
//---------------------------------------------------------------------------------------------------------
var selectedID = 0;

function showoffer(what)
{
	//	Hide existing one
	if (selectedID)
	{
		hideoffer();	
	}
	
	offerobject							= document.getElementById('offer' + what);
	offerobject.style.visibility			= 'visible'; 
	selectedID							= what;
}

function hideoffer()
{
	if (selectedID)
	{
		selectedobject					= document.getElementById('offer' + selectedID);
		selectedobject.style.visibility = 'hidden'; 
		selectedID						= 0;
	}
}

//---------------------------------------------------------------------------------------------------------
//	Show contacts (on click shows div layer)
//---------------------------------------------------------------------------------------------------------
var selectedID = 0;

function showcontact(what)
{
	//	Hide existing one
	if (selectedID)
	{
		hidecontact();	
	}
	
	contactobject							= document.getElementById('contact' + what);
	contactobject.style.display				= 'block'; 
	selectedID								= what;
}

function hidecontact()
{
	if (selectedID)
	{
		selectedobject					= document.getElementById('contact' + selectedID);
		contactobject.style.display		= 'none'; 
		selectedID						= 0;
	}
}

//----------------------------------//
//  Javascript - showDetails		//	
//  opens large horzonal window		//
//----------------------------------//	
	
	function showDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=0,toolbar=0,location=0,width=420,height=330");
}

function DoJunc( url )
{
 if ( !opener.closed )
 {
  opener.document.location    = url
 } 
}

//----------------------------------//
//  Javascript - videoDetails		//	
//  opens large horzonal window		//
//----------------------------------//	
	
	function videoDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=0,toolbar=0,location=0,width=700,height=450");
}

function DoJunc( url )
{
 if ( !opener.closed )
 {
  opener.document.location    = url
 } 
}


function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// =======================================
// Slide Show
// =======================================

			// (C) 2000 www.CodeLifter.com
			// http://www.codelifter.com
			// Free for all users, but leave in this  header
			// NS4-6,IE4-6
			// Fade effect only in IE; degrades gracefully

			// =======================================
			// set the following variables
			// =======================================

			// Set slideShowSpeed (milliseconds)
			var slideShowSpeed = 5000

			// Duration of crossfade (seconds)
			var crossFadeDuration = 3

			// Specify the image files
			var Pic = new Array() // don't touch this
			// to add more images, just continue
			// the pattern, adding to the array below

			Pic[0]	= 'images/slide_show_1.jpg'
			Pic[1]	= 'images/slide_show_2.jpg'
			Pic[2]	= 'images/slide_show_3.jpg'
				

			// =======================================
			// do not edit anything below this line
			// =======================================

			var t
			var j = 0
			var p = Pic.length

			var preLoad = new Array()
			for (i = 0; i < p; i++){
			   preLoad[i] = new Image()
			   preLoad[i].src = Pic[i]
			}

			function runSlideShow(){
			   if (document.all){
				  document.images.SlideShow.style.filter="blendTrans(duration=3)"
				  document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
				  document.images.SlideShow.filters.blendTrans.Apply()      
			   }
			   document.images.SlideShow.src = preLoad[j].src
			   if (document.all){
				  document.images.SlideShow.filters.blendTrans.Play()
			   }
			   j = j + 1
			   if (j > (p-1)) j=0
			   t = setTimeout('runSlideShow()', slideShowSpeed)
			}

