// JavaScript Document
var baseText = null; 

function showPopup(t,l,w,h, nType)
{ 


//	var popUp = nType == 1 ? window.document.getElementById("popupcontent") : window.document.getElementById("delpopup");  
	
	switch(nType)
	{
		case 1:
			popUp = window.document.getElementById("popupcontent") ;
			break;
		case 2:
			popUp = window.document.getElementById("delpopup");  
			break;
		case 3:
			popUp = window.document.getElementById("colourpopup");  
			break;
		default:
	}

	var winW = 0;
	var winH = 0;
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}
	
	if (l == -1)
	{
		l = (winW / 2) - (w /2);
	}	
	if (t == -1)
	{
		t = (winH / 2) - (h /2);
	}	
	
	popUp.style.top = t + "px";   
	popUp.style.left = l + "px";   
	popUp.style.width = w + "px";   
	popUp.style.height = h + "px";    
	
	popUp.style.visibility = "visible";
}

function hidePopup(nList, nType)
{   
//	var popUp = nType == 1 ? window.document.getElementById("popupcontent") : window.document.getElementById("delpopup");   
//	var lst = nType == 1 ? window.document.getElementById("pattern") : window.document.getElementById("delivery");   
	
	switch(nType)
	{
		case 1:
			popUp = window.document.getElementById("popupcontent") ;
			lst = window.document.getElementById("pattern");   
			break;
		case 2:
			popUp = window.document.getElementById("delpopup");  
			lst = window.document.getElementById("delivery");   
			break;
		case 3:
			popUp = window.document.getElementById("colourpopup");  
			lst = window.document.getElementById("colour");   
			break;
		default:
	}	
		
	popUp.style.visibility = "hidden";
	lst.selectedIndex = nList; 
}