//  Flyer onLoad Popup
function flyerLoad(url, windowName, w, h) {

        var l = (screen.width - w) / 2;
        var t = (screen.height - h) / 2;

        self.name = "loader" ;
        features = 'height='+h+', width='+w+', top='+t+', left='+l+', menubar=yes, toolbar=no, location=no, status=no, scrollbars=yes, resizable'
        window.open(url, windowName, features)
}

//  Example : <body onLoad="flyerLoad('http://rbmc.net', 'rbmcWindow', 600, 400); return(false);">

//  Flyer onClick Popup
function flyerClick(url, windowName, w, h) {

        var l = (screen.width - w) / 2;
        var t = (screen.height - h) / 2;

        self.name = "click" ;
        features = 'height='+h+', width='+w+', top='+t+', left='+l+', menubar=yes, toolbar=no, location=no, status=no, scrollbars=yes, resizable'
        win = window.open(url, windowName, features)
        if (parseInt(navigator.appVersion) >= 4)
                {
                        win.window.focus() ;
                }
}

//  Example : <a href="#" onClick="flyerClick('http://rbmc.net', 'rbmcWindow', 600, 400); return(false);">RBMC Site</a>

// View more images
var ord=100000+Math.floor( 1000000*Math.random() );
function showImages(W, H) {
		imagePopup = window.open("", "imagePopup", "height=" + H + ",width=" + W + ",location=no,scrollbars=yes,toolbar=no,resizable=yes,hotkeys=yes");
		imagePopup.focus();
		return true;
}

// View the calendar
var ord=100000+Math.floor( 1000000*Math.random() );
function viewCalendar(W, H) {
		calendarPopup = window.open("", "calendarPopup", "height=" + H + ",width=" + W + ",location=no,scrollbars=yes,toolbar=no,resizable=yes,hotkeys=yes");
		calendarPopup.focus();
		return true;
}

// Focus on the main window
var ord=100000+Math.floor( 1000000*Math.random() );
function mainView() {
		ataMain = window.open("","ataMain");
		ataMain.focus();
		return true;
}

// Pop a new window, in a tight frame
var ord=100000+Math.floor( 1000000*Math.random() );
function pophardView(W, H) {
		popUp = window.open("", "popUp", "height=" + H + ",width=" + W + ",location=no,scrollbars=no,toolbar=no,resizable=yes,hotkeys=yes");
		popUp.focus();
		return true;
}
