var spawn = null;

//	 Variables

		var w = screen.availWidth;
		var h = screen.availHeight;
		var topP1 = Math.round((h-200)/2);
		var leftP1 = Math.round((w-200)/2);
		var topP2 = Math.round((h-450)/2);
		var leftP2 = Math.round((w-500)/2);
		var topP3 = Math.round((h-410)/2);
		var leftP3 = Math.round((w-400)/2);

//	 ##################################################
//	 Open Popup Window Function
//	 ##################################################
	function winNow(category) {
		spawn = window.open( '/prof/qml/asp_qml.asp?tId='+category+'', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
	}

	function winCat() {
		spawn = window.open( '/prof/qml/asp_qml.asp', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
	}


	function winLoadAll(){
    if (spawn != null && !spawn.closed)
    {
         if (spawn.blur) spawn.focus();
    }
    else
    {
	spawn = window.open( 'default.asp', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
    }
    
	}

		
	function winLoadAllHome(){
	if(document.search.qt.value.length<=0) 
	{
		alert("Please enter Product to be searched!!!");
		document.search.qt.focus();
	}
	else
	{
		spawn = window.open( 'default.asp', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
	}	
	}

	function blowOut() {
		if (spawn != null && spawn.open) spawn.close();
	}

    function onTop(category) {
        if (spawn != null && !spawn.closed) {
             if (spawn.blur) spawn.focus();
        } else {
            spawn = window.open( 'default.asp', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
        }
    }

    function qmlSection(section) {
        spawn = window.open( 'default.asp', 'QmlWindow', 'width=537,height=410,screenX='+leftP2+',screenY='+topP2+',top='+topP2+',left='+leftP2+',toolbar=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' ) ;
    }


function validat()
{
	if(document.search.search_radio[0].checked || document.search.search_radio[1].checked)
	{
		if(document.search.qt.value.length>0)
		{
			document.search.action="searchresult.aspx";
			return true;
		}
		else
		{
			alert("Please Enter Word To Be Searched!!!");
			document.search.qt.focus();	
			return	false;
		}
	}
}
