/* --convert from default.js-- */
// sub window
function pWin (wUrl,wName,wProp) {
	newWin = window.open (wUrl,wName,wProp);
	newWin.focus();
}
function pWinGen (wUrl,wName,wScl,wRsz,wWdt,wHgt) {
	newWin = window.open (wUrl,wName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=' + wScl + ',resizable=' + wRsz + ',width=' + wWdt + ',height=' + wHgt);
	newWin.focus();
}

// rollover
function chImg(name,num){
	if (document.images) document.images[name].src = imgTo[num].src;
};



/* -- target="blank" alternate -- */
var PopupWindow = Class.create();
PopupWindow.prototype = {
    initialize: function(className, parentElement) {
        var elements = document.getElementsByClassName(className, parentElement);
        for (var i = 0, len = elements.length; i < len; i++) {
            Event.observe(elements[i], 'click', this.addPopupEvent.bindAsEventListener(this));
            Event.observe(elements[i], 'keypress', this.addPopupEvent.bindAsEventListener(this));
        }
    },
    addPopupEvent: function(event) {
        var element = Event.element(event);
        var link = element.getAttribute('href');
        window.open(link);
        Event.stop(event);
    }
};

Event.observe(window, 'load', function () {
    new PopupWindow('blank');
});



/* -- automatic display year -- *
 * embed bellow strings
 *-------------------------------------------*
 * <script type="text/javascript">
 * <!--
 * ShowNowYear();
 * // -->
 * </script>
 *-------------------------------------------*/
function ShowNowYear() {
   var now = new Date();
   var year = now.getFullYear();
   document.write(year);
};




/* -- SUBWINDOW -- */
function Openwin(html,name,width,height,scroll,resize) {
SubWindow=window.open(html,name,"width="+width+",height="+height+",toolbar=0,location=0,status=0,menubar=0,scrollbars="+scroll+",resizable="+resize+"");
	SubWindow.focus();
};

function OpenwinFull(html,name,width,height,scroll,resize) {
		SubWindow=window.open(html,name,"width="+width+",height="+height+",toolbar=1,location=0,status=0,menubar=0,scrollbars="+scroll+",resizable="+resize+"");
	SubWindow.focus();
};

function OpenwinPRINT(html,name,width,height,scroll,resize) {
SubWindow=window.open(html,name,"width="+width+",height="+height+",toolbar=0,location=0,status=0,menubar=1,scrollbars="+scroll+",resizable="+resize+"");
	SubWindow.focus();
};


