﻿<!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
//-->

//Name: openCustomWin()
//Purpose: To open a window with varying attributes
function openCustomWin(strUrl,strName,intHeight,intWidth,strDetails) {
	
	var top = (screen.height/2)-(intHeight/2);
	var left = (screen.width/2)-(intWidth/2);
	
	//alert("Screen Width:" + screen.width);
	//alert("Left Val:" + left);	
	//alert("Screen height:" + screen.height);
	//alert("Left Val:" + top);
	

	//var windowDetails;
	if(strDetails=='all') {
		strDetails = 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes'
	}	
	if(strDetails=='limited') {
		strDetails = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no'
	}	
	
	windowDetails = window.open(strUrl,strName,"height=" + intHeight + ",width=" + intWidth + ",left=" + left + ",top=" + top + "," + strDetails);
	if(windowDetails) { windowDetails.focus();	}
	return false;
	
}
