<!--
/*
  -------------------------------------------------------------------------------
 |  Copyright (C) 2006 Azalea Technology, LLC. 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.                                                            |
  -------------------------------------------------------------------------------
 |  Decrypting or otherwise decoding the following programming language code is  |
 |  strictly prohibited except as expressly authorized by Azalea Technology,     |
 |  LLC. 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.                                                 |
  -------------------------------------------------------------------------------
         Purpose: DOM window function library
         Version: 1.0
      Programmer: Benjamin Roberts
                  Azalea Technology, LLC.
                  P.O. Box 131150
                  Tyler, TX 75713-1150
  -------------------------------------------------------------------------------
*/

function showInquiryWindow(url){
	var w = 410;
	var h = 470;
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;
	var inquiryWindow = window.open(url,"","height="+h+",width="+w+",status=no,scrollbars=no,resizable=no");
	try{
		inquiryWindow.moveTo(x,y);
		inquiryWindow.focus();
	}
	catch(e){
		// Do Nothing
	}
}

/*
	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
*/
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");
	try{
		nw.moveTo(x,y);
	}
	catch(e){
		// Do nothing
	}
	
	try{
		nw.focus();
	}
	catch(e){
		// Do nothing
	}
}

function play_flash_video(){
	var arg_count,x,y,videofile,h,w;
	var player_height_padding = 20;
	var window_height_padding = 115;
	var window_width_padding = 50;
	arg_count = arguments.length;
	if(arg_count<1) return;
	if(arg_count==1) videofile = arguments[0];
	else if(arg_count==2){
		videofile = arguments[0];
		w = arguments[1];
	}
	else if(arg_count>2){
		videofile = 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("videoplayer.php?video="+videofile+"&width="+w+"&height="+(h+player_height_padding),"","height="+(h+window_height_padding)+",width="+(w+window_width_padding)+",status=no,scrollbars=no,resizable=no");
	
	// Try to reposition the window in the cetner of the screen
	try{
		nw.moveTo(x,y);
		nw.focus()
	}
	catch(e){
		// Do nothing
	}
}

//-->