<!--
/*
infopoup.js
click image opens div popinf
*/


// xxxxxxxxxxxxxxxxxxxxxxxxxx pages other than catalogues xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
currentDiv = "welcomeTemp"; // this is to seed for first opening
function closeLastPage()
{
//alert(currentDiv);
	if (currentDiv > "")
	{
		tempDiv = document.getElementById(currentDiv);
		tempDiv.style.top = "-2000px";
	}

}

function openContent(whichPage)
{
	// hide last div
	if (whichPage != "loadown")
	{
closeLastPage();
	}

	switch(whichPage)
	{

	case "aboutus":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "aboutUs/aboutUs.html" frameborder = 0></iframe>';
		break;

	case "contact":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "contact/contact.html" frameborder = 0></iframe>';
		break;

	case "terms":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "terms/terms.html" frameborder = 0></iframe>';
		break;

	case "links":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "links/links.html" frameborder = 0></iframe>';
		break;

	case "trade":
	currentDiv = "tradeOuterDiv";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("tradeOuterDiv");
		tempDiv.style.top = "216px";
		//tempDiv.innerHTML = '<iframe id="contentframe" src = "trade/trade.html" frameborder = 0></iframe>';
		break;

	case "tella":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "tella/tella.html" frameborder = 0></iframe>';
		break;
		
			case "feedback":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "feedback/feedback.html" frameborder = 0></iframe>';
		break;


	case "loadown":
	currentDiv = "loadOwn";
		//closeLastShop(currentShop);
		tempDiv=document.getElementById("loadOwn");
		tempDiv.style.top = "50px";
		tempDiv.innerHTML = "<iframe src =\"loadown/load_own.html\" id = \"uploadFrame\" ></iframe>";
		break;

	case "shophelp":
	currentDiv = "content";
		//closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "help/help.html" frameborder = 0></iframe>';
		break;

	case "gallery":
	currentDiv = "content";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("content");
		tempDiv.style.top = "216px";
		tempDiv.innerHTML = '<iframe id="contentframe" src = "gallery/gallery.html" frameborder = 0></iframe>';
		break;


	case "home":
	currentDiv = "welcomeTemp";
		closeLastShop(currentShop);
		tempDiv=document.getElementById("welcomeTemp");
		tempDiv.style.top = "216px";
		//document.getElementById("content").innerHTML = '';
		//MM_showHideLayers('content','','hide','images','','show');

		break;

	}

}


// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx shops xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
function closeLastShop(whichShop)
{
	if (whichShop >"")
	{
		tempDiv = document.getElementById(whichShop);
		tempDiv.style.top = "-2000px";
	}
}

/*
first close all divs
then open particular shop plus images
*/
currentShop = ""; // this is to close last shop when opening another
function changeShop(whichShop)
{
	// close last shop
	closeLastShop(currentShop);

	// reset current shop
	currentShop = whichShop;
	// now show new shop
	tempDiv = document.getElementById(whichShop);
	tempDiv.style.top = "210px";

}

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx end shops xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx photo popup xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

var photo = ""; // will be picked up in popup
var text = ""; // will be picked up in popup
function infopopup(thisphoto, thistext)
{
parent.photo = thisphoto;
parent.text = thistext;

	// show div
	tempDiv = document.getElementById("popinfo");
	tempDiv.style.top = "5px";
	tempDiv.innerHTML = '<iframe id="popinfoframe" src = "gallery/photopopup.html" frameborder = 0></iframe>';


	
}

function closeinfopopup()

{
	tempDiv = document.getElementById("popinfo");
	tempDiv.style.top = "-2000px";
}

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx end photopopup xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// -->

