
//FLASH INTRO DUMMY

var img;
var looper = 1;
var flashPics;
function flashIntroDummy(image)
{
	img = image;
	flashPics = getID("flashIntroDummy"); 
	swap(1);
}
function swap(no)
{
	var imagePath = img + no + ".jpg";
	//alert("<img src='" + imagePath + "'>");
	flashPics.innerHTML = "<img src='" + imagePath + "'>";
	if(looper++==4)
	   looper=1;
	setTimeout("swap(looper)",5000);
}
//END

// HEADER LINK SWAP IMAGE

function swapImage(id,path)
{
    getID(id).style.backgroundImage="url("+path+")";
}

// END

function getID(id)
{
    return document.getElementById(id);	
}
function showContainer(id)
{
    getID(id.toString()).style.visibility = "visible";	
}
function hideContainer(id)
{
    getID(id.toString()).style.visibility = "hidden";	
}

function findPosX(obj)
{
	var curleft = 0;
	if(obj.offsetParent)
		while(1) 
		{
		  curleft += obj.offsetLeft;
		  if(!obj.offsetParent)
			break;
		  obj = obj.offsetParent;
		}
	else if(obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if(obj.offsetParent)
		while(1)
		{
		  curtop += obj.offsetTop;
		  if(!obj.offsetParent)
			break;
		  obj = obj.offsetParent;
		}
	else if(obj.y)
		curtop += obj.y;
	return curtop;
}

function showCountries(id,xAdjust,yAdjust)
{
	
	var id2 = id+"_c";

    var	continentContainer = getID(id);
	var countryContainer = getID(id2);
	
	var x1 = findPosX(continentContainer);
	var y1 = findPosY(continentContainer);
	
	//alert(x+"  "+y);
	x = x1 + xAdjust + "px";
	y = y1 + yAdjust + "px";
	
	countryContainer.style.left = x.toString();
	countryContainer.style.top = y.toString();

	showContainer(id2);
	
}


function showCities(id,xAdjust,yAdjust)
{

	var id2 = id +"t";

//alert(id +"   "+ id2);
    var	countryContainer = getID(id);
	var cityContainer = getID(id2);
	
	var x1 = findPosX(countryContainer);
	var y1 = findPosY(countryContainer);
	
	
	x = x1 + xAdjust + "px";
	y = y1 + yAdjust + "px";
	
	cityContainer.style.left = x.toString();
	cityContainer.style.top = y.toString();

	showContainer(id2);
	
}

function hideCountries(id)
{
    var id2 = id + "_c";
	
	hideContainer(id2);
}

function hideCities(id)
{
    var id2 = id + "t";
	
	hideContainer(id2);

}

function showInputBox()
{
	for(var i = 1;i<=8;i++)
	{
		var c = 'c'+i;
	    showContainer(c);
	
	}
}
function hideInputBox()
{
	for(var i = 1;i<=8;i++)
	{
		var c = 'c'+i;
	    hideContainer(c);
	
	}
}