function customwindow(sign)
{
  var url="viewdemoform.asp?et="+sign
  showDialog(url,"", screen.width-50,screen.height-175,true,"top=20,left=0,menubar=yes,status=yes,toolbar=yes,scrollbars=yes,resizable=yes,location=yes,alwaysRaised")
  
}

function showDialog(url, windowName, width, height, center, extraFeatures)
    {
	
		widthStr = width ? ",width=" + width : ""
		heightStr = height ? ",height=" + height : ""
		if (center)
		{
			leftPos = (window.screen.width - width) / 2
			topPos  = (window.screen.height - height) / 2
			posStr = ",left=" + leftPos + ",screenX=" + leftPos + 
					 ",top=" + topPos + ",screenY=" + topPos
		}
		else
			posStr = ""

		var windowFeatures = "dependent=yes" + widthStr + heightStr + posStr
		if (extraFeatures)
			windowFeatures += "," + extraFeatures
			
        winModalWindow = window.open (url, windowName, windowFeatures)
        winModalWindow.focus()
        
        return winModalWindow
    }
