// Central fixed size Window opener

isAOL = navigator.userAgent.indexOf("AOL")!=-1;


function launchWin(url,boxname,r_Width,r_Height,statusbar,scrollbar,resize) {		
	if ( screen && screen.width && screen.height ) {
	var xxx = (screen.width - r_Width) / 2 - 6;
	var yyy = (screen.height - r_Height) / 2;
	} else {
	var xxx = (640 - r_Width) / 2 - 6;
	var yyy   = (480 - r_Height) / 2;
	}
	var props = "width=" + r_Width + "," 
			+ "height=" + r_Height + "," 
			+ "location=0," 
			+ "menubar=0,"
			+ "resizable="+ resize +","
			+ "scrollbars="+ scrollbar +","
			+ "status="+ statusbar +"," 
			+ "titlebar=0,"
			+ "toolbar=0,"
			+ "hotkeys=0,"
			+ "screenx=" + xxx + ","
			+ "screeny=" + yyy	+ ","
			+ "left=" + xxx + ","
			+ "top=" + yyy;
			
// AOL browser workaround

	var propsAOL = "width=" + r_Width + "," 
			+ "height=" + r_Height + "," 
			+ "location=0," 
			+ "menubar=0,"
			+ "resizable="+ resize +","
			+ "scrollbars="+ scrollbar +","
			+ "status="+ statusbar +"," 
			+ "titlebar=0,"
			+ "toolbar=0,"
			+ "hotkeys=0"
	;

	isAOL ? r_window = window.open (url, boxname, propsAOL) : r_window = window.open (url, boxname, props);
	r_window.focus();
}

// Builds Array from declared Pics on main page

var p = Pic.length
var preLoad = new Array()
var i = 0;
for (i = 0; i < p; i++){
     preLoad[i] = new Image()
     preLoad[i].src = Pic[i]
}

// Flip the Pics

function switchImage(whichImage,imageNumber) {
   document.images[whichImage].src = preLoad[imageNumber].src;
}

// Status bar messages

function statusBar(message) {
window.status = message;
return true;
}

function shutDownReturn() {
window.opener.location="http://www.ritchie.com.br";
setTimeout('window.close();',2000);
}

function shutDown() {
setTimeout('window.close();',1000);
}

function formSelectText () {
document.rform.address.select();
}

function goNow() {
var destiny = document.selector.links.options[document.selector.links.selectedIndex].value;
location.href = destiny;
}
