<!--

function rolloverjpg(img_name, action){
	if(document.images){
		imgSrc = "./images/" + img_name + action + ".jpg";
		document[img_name].src = imgSrc;
	}
}

function preLoadImgs(){

	var imgArray = new Array(); 
	var img 
	var i	 
	
	for (i=0; i<document.images.length; i++){ 
 		img = document.images[i]; 
		imgArray[i] = new Image(img); 
	} 

}
function IsPopupBlocker(oWin) {
	 if (oWin==null || typeof(oWin)=="undefined") {
		return true;
	} else {
		return false;
	}
}
function fncOpenNewWindow(url,width, height, resize, scroll) {
	iTop = 0
	iLeft = 0
	if (screen) {
		iLeft = (screen.width / 2) - (width/2) 
		iTop= (screen.height / 2) - (height/2) 
	} 
	var randomnumber=Math.floor(Math.random()*100001)
	//alert(randomnumber)
	iwidth = parseInt(width);
	iheight = parseInt(height);
	 child = window.open(url,"QXWindow" + randomnumber, "width=" + iwidth + ",height=" + iheight + ",resizable=" + resize + ",scrollbars=" + scroll + ", Top = " + iTop + ", Left = " + iLeft + ",location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0"); 
	if (IsPopupBlocker(child)) {
	alert("You have a pop up blocker enabled. Please press the 'Ctrl' button while clicking the link/button again. \n\nIf you continue to have issues, please contact QXpress or disable your pop-up blocker.");

}  
else
{
child.focus();
}
}

function open_new_window(url,width, height, resize, scroll) {
	iTop = 0
	iLeft = 0
	if (screen) {
		iLeft = (screen.width / 2) - (width/2) 
		iTop= (screen.height / 2) - (height/2) 
	}
	//iTop = 45;
	
	//iwidth = parseInt(width) + 17;
	//iheight = (parseInt(height) - 20);
	var randomnumber=Math.floor(Math.random()*100001)
	
	//alert(randomnumber)
	iwidth = parseInt(width);
	iheight = parseInt(height);
	 child = window.open(url,"QXWindow" + randomnumber, "width=" + iwidth + ",height=" + iheight + ",resizable=" + resize + ",scrollbars=" + scroll + ", Top = " + iTop + ", Left = " + iLeft + ",location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0");
	child.focus();
} 
//Make sure the first text box has focus when page loads
function FocusOnFirstTextBox() {
    var answer = '';
	
	if (document.forms[0]){
	//don't' focus fuseaction=ProductsPurchase.Select%20QX%20Produc
		if(document.forms[0].name == 'QXProductsSelection'){
			return false;
		}
    for (var i = 0; i<document.forms[0].elements.length; i++) {
		if (document.forms[0].elements[i].type == 'text'){
		document.forms[0].elements[i].focus()
				
				return false;
		}
				
           }
    }
   
}
//--> 

function fullopenQX7Movies(url,width, height, resize, scroll) { 
 
 if (window.screen.width <= 800){
  //if (document.all) {
          child = window.open(url,'QXMoviesFull',"   top=0, left=0, toolbar=no,status=no, scrollbars=no, location=no, menubar=no, directories=no,resizable=no, fullscreen=yes, titlebar=no");
          return false;    //}
 }
 else{
 
 iTop = 0
 iLeft = 0
 width = 800;
 height = 600; 
 resize=1
 scroll = 0;
 if (screen) {
  iLeft = (screen.width / 2) - (width/2) 
  iTop= (screen.height / 2) - (height/2) 
 }
 child = window.open(url,"QXMovies", "width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + ", Top = " + iTop + ", Left = " + iLeft + "");
 if (IsPopupBlocker(child)) {
 alert("You have a pop up blocker enabled. Please press the 'Ctrl' button while clicking the link/button again. \n\nIf you continue to have issues, please contact QXpress or disable your pop-up blocker.");
}  
else
{
child.focus();
}
 }
  return false;
}  
