<!--
/*

 -------------------------------------------------------------------------------
|  Copyright (C) 2004 Azalea Technology. All rights reserved.                   |
|-------------------------------------------------------------------------------|
|  Unauthorized removal of this notice is considered a violation of the         |
|  license agreement under which this Code may be used. This work is protected  |
|  under United States copyright law and the similar law(s) of other countries  |
|  under which such as work is afforded legal protection, and upon conviction   |
|  of such a violation in a court of applicable jurisdiction, such person(s)    |
|  may be subject to the maximum allowable penalty as permitted under such law. |
|-------------------------------------------------------------------------------|
|  You acknowledge and agree that information presented to you through this     |
|  site (the "Web Site") is protected by all applicable copyrights, trademarks, |
|  service marks, patents or other proprietary rights and laws, and by virtue   |
|  of accessing the Web Site, except as expressly authorized by the Azalea      |
|  Technology, LLC., you agree not to modify, rent, lease, loan, sell,          |
|  distribute, store, or create derivative works based on the Web Site, in      |
|  whole or in part.                                                            |
 -------------------------------------------------------------------------------

 Organization: Physicians Contracting Organization of Texas
       Domain: www.pcot.org
      Purpose: Open Window(s) function library
	     Date: Tuesday, November 2, 2004 11:05 PM CST
   Programmer: Benjamin Roberts (broberts@azaleatech.com)
               Azalea Technology, LLC.
               P.O. Box 131150
			   Tyler, TX 75713-1150
*/

function showInquiryWindow(url){
	var w = 500;
	var h = 502;
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;
	var inquiryWindow = window.open(url,"","height="+h+",width="+w+",status=no,scrollbars=yes,resizable=no");
	inquiryWindow.moveTo(x,y);
	inquiryWindow.focus();
}

function showHelpInfo(id){
	var height = 0;
	var width = 0;
	if((browser.isExplorer||browser.isNetscape) && browser.version >= 4 ){
		height = Math.floor(.90*screen.height);
		width = 250;
		xPos = Math.abs((screen.width - width)-5)
		yPos = 0;
	}
	else{
		height = 350
		width = 500;
		xPos = Math.abs((screen.width - width)-5)
		yPos = 0;
	}
	
	var helpWindow = window.open("https://www.pcot.org/lib/asp/help.asp?id="+id,"_help","height="+height+",width="+width+",left="+xPos+",top="+yPos+",screenX="+xPos+",screenY="+yPos+",status=no,scrollbars=yes,resizable=no");
	helpWindow.focus();
}


function showObjectInfoDialog(strObjectName,strObjectID,strObjectType,strObjectCreateDate,strObjectCreator,strObjectModifyDate,strObjectModifier,strObjectOwner){
	alert("Name: "+strObjectName+"\nObject Type: "+strObjectType+"\nID Number: "+strObjectID+"\n___________________________________________    \n\nCreated: "+strObjectCreateDate+" by "+strObjectCreator+"    \nModified: "+strObjectModifyDate+" by "+strObjectModifier+"    "+"\nOwner: "+strObjectOwner+"    ");
}

/*   
    Function name: owx
        Arguments: accepts 1-3 arguments: target url, windows width, and window height
            Usage: owx(url[,w][,h])
      Description: opens a new window containing the specified url
            Notes: 
*/
function owx(){
    var arg_count,x,y,url,h,w;
    arg_count = arguments.length;
    if(arg_count<1) return;
    if(arg_count==1) url = arguments[0];
    else if(arg_count==2){
        url = arguments[0];
        w = arguments[1];
    }
    else if(arg_count>2){
        url = arguments[0];
        w = arguments[1];
        h = arguments[2];
    }
    x = (screen.width-w)/2;
    y = (screen.height-h)/2;
    if(isNaN(x)||x<0) x = 5;
    if(isNaN(y)||y<0) y = 5;
    var nw = window.open(url,"","height="+h+",width="+w+",status=no,scrollbars=yes,resizable=no,alwaysRaised=yes");
    try{
		nw.moveTo(x,y)
	}
	catch(e){
		// Do nothing
	}
	
	try{
		nw.focus()
	}
	catch(e){
		// Do nothing
	}
}

//-->


