
var popupScroll = new Object()

 function TopLeftPopupScroll(URL, wt, ht)
{

    	
    	popupScroll = window.open(URL, 'PopUp', 
			'resizable=yes ' +
    		'scrollbars=yes ' +
    		'width=' + wt + ' ' +
    		'height=' + ht + ' ' +
    		'top=0'  + ' ' +
    		'left=0'  
    		)
    	
    	popupScroll.focus()
}

function CenterPopupScroll2(URL, wt, ht)
	{
	
	// get center of browser window
	var X = getbrowserwidth() / 2
	var Y = getbrowserheight() / 2
	
	popupScroll = window.open(URL, 'PopUp', 
	'resizable=yes ' +
	'scrollbars=yes ' +
	'width=' + wt + ' ' +
	'height=' + ht + ' ' +
	'top=' + (window.screenTop + (Y - (ht/2))) + ' ' +
	'left=' + (window.screenLeft + (X - (wt/2))) 
	)
	
	popupScroll.focus()
	}


function tipsmenuroll (iRoll)
	{
	switch (iRoll) {
	case(0): window.event.srcElement.className = "tipsmenu";
	break;
	case(1): window.event.srcElement.className = "tipsmenuon";
	break;
	case(2): window.event.srcElement.className = "tipsTDmenuon";
	break;
	case(3): window.event.srcElement.className = "tipsTDmenu";
	break;
	}
	}

function menuroll (iRoll)
	{
	switch (iRoll) {
	case(0): window.event.srcElement.className = "menu";
	break;
	case(1): window.event.srcElement.className = "menuon";
	break;
	case(2): window.event.srcElement.className = "TDmenuon";
	break;
	case(3): window.event.srcElement.className = "TDmenu";
	break;
	}
	}


function typeselect (iType) {
	switch (iType) {
	case(0): document.wsatype.src="/2002mainpage/images/bgwhite.gif";
	window.event.srcElement.className = "hdmenu";
	break;
	case(1): document.wsatype.src="/2002mainpage/images/mo_karate2.jpg";
	window.event.srcElement.className = "hdmenuon";
	window.status="Karate";
	break;
	case(2): document.wsatype.src="/2002mainpage/images/mo_aikido.jpg";
	window.event.srcElement.className = "hdmenuon";
	window.status="Aikido";
	break;
	case(3): document.wsatype.src="/2002mainpage/images/mo_iaido.jpg";
	window.event.srcElement.className = "hdmenuon";
	window.status="Iaido";
	break; 
	case(4): document.wsatype.src="/2002mainpage/Books/pics/MyWayOfLifes.gif";
	window.event.srcElement.className = "menuon";
	window.status="Books";
	break; 
	case(5): document.wsatype.src="/2002mainpage/images/pnthr.jpg";
	window.event.srcElement.className = "menuon";
	window.status="DVDs";
	break; 
	case(6): document.wsatype.src="/2002mainpage/images/bgwhite.gif";
	window.event.srcElement.className = "menu";
	break; 
	case(7): document.wsatype.src="/2002mainpage/images/mo_karate2.jpg";
	window.event.srcElement.className = "menuon";
	window.status="Sensei";
	break; 
	case(8): document.wsatype.src="/2002mainpage/images/mousesensei.jpg";
	window.status="Sensei";
	break; 
	case(10): document.wsatype.src="/2002mainpage/images/bgwhite.gif";
	break; 
	}}

function getbrowserwidth()
	{
	if (navigator.userAgent.indexOf("MSIE") > 0)
	{
	return(document.body.clientWidth);
	}
	else
	{
	return window.outerWidth;
	}
	}
	function getbrowserheight()
	{
	if (navigator.userAgent.indexOf("MSIE") > 0)
	{
	return(document.body.clientHeight);
	} 
	else
	{
	return(window.outerHeight);
	}
	}
	
var popup = new Object()

function CenterPopup(URL, width, height)
	{
	// get center of browser window
	var X = getbrowserwidth() / 2
	var Y = getbrowserheight() / 2
	
	popup = window.open(URL, 'PopUp', 
	'scrollbars=no ' +
	'width=' + width + ' ' +
	'height=' + height + ' ' +
	'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
	'left=' + (window.screenLeft + (X - (width/2))) 
	)
	
	popup.focus()
	}
	
