/* 	Bouchard Group Java script functions 
	Author: 		Byron Burt
	Created: 		6/8/2005
	Description:	Holds all javascript functions for Bouchard Group Site
*/
function sapguiWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=800,width=750,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

//This function is used for miscellaneous page displays in a short window
function shtWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=550,width=750,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is the tiny popup window for advisory pages in the admin 
function tinyWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=250,width=480,top=0,left=300,resizable=0,status=0'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is the popup window for menu selections 
function menuWindow(url) {
var newWin
newWin = window.open(url,null,'height=800,width=850,top=0,left=0,scrollbars=yes,resizable=no');
}

// This function is the popup window for dynamic small pages 
function smallWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=600,width=450,top=0,left=0,scrollbars=no,resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is the popup window for showcase photos
function showcaseWindow(dtlpage, winName, winProps)  {
win = window.open(dtlpage, winName, winProps)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}


// This function is the popup window for dynamic content pages 
function contentWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=800,width=710,top=0,left=0,scrollbars=yes,resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is the popup window for wide  content pages 
function wideWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=800,width=1000,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}


// this function is the popup window for referral forms
function referralWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=800,width=710,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is the popup window for regular sized photos

function movieWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=250,width=350,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}


// This function is for the popup window for Dan's Pans (panoramic) photos
function panWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=450,width=900,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is used for the mortgage tools calculator popup
function RdformWindow(dtlpage, dtlname, w, h, scroll)  {
var win1 = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height=570,width=710,top=0,left=0,scrollbars='+scroll+',resizable=no'
win = window.open(dtlpage, dtlname, winprops)
if (parseInt(navigator.appVersion) >=4)  { win.window.focus();}
}

// This function is used to print popup pages 
function printPage() {
window.print();
}

//This function is used to close a popup window
function closeWindow(){
window.close()
}
