browserType=navigator.appName.charAt(0)+navigator.appVersion.charAt(0);
var miscWindow,offsiteWin,kanjiWindow,disWindow;
var myName,myURL;
//*****************************
function protectImages(e){
    var browser = navigator.appName.substring ( 0, 9 );
    var event_number = 0;
    if (browser=="Microsoft")
        event_number = event.button;
    else if (browser=="Netscape")
        event_number = e.which;

    if ( event_number==2 || event_number==3 )
        {
		alert("Copyright Buffalo Records");
		return false;
        }

    return (true);
}

function trap_images_mouse_events (){
    if ( document.images )
        {
        for (var pic=0; pic<document.images.length; pic++)
            document.images[pic].onmousedown = protectImages;
        }
}

window.onload = trap_images_mouse_events;
//*****************************
/*
//firstversion
function protectImages(e) {
	if (navigator.appName == 'Netscape' &&(e.which == 3 || e.which == 2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' &&(event.button == 2 || event.button == 3)) {
		alert("2000 Copyright PR Productions Inc.");
		return false;
	}
	return true;
} 
  
document.onmousedown=protectImages;
document.onmouseup=protectImages;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=protectImages;
window.onmouseup=protectImages;

*/

//*****************************
//8-15-02
//changes multiple pages (loads mailbox page)

function changePages(pg1,pg2){

		
	parent.mailGadget.location.href = pg1;
	parent.inforoom.location.href = pg2;

}




//*****************************
function pr_popUp(myURL,myName,myWidth,myHeight,scrolling){

	if(screen){

		leftPos = screen.width/2-(myWidth/2);
		topPos = screen.height/2-(myHeight/2);

	}

if (browserType=="N2"){

miscWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;

miscWindow.opener=myURL;



}else if (browserType.charAt(0)=="M"){

miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;



}else{



miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;

}

if (browserType=="N2"){

miscWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;

miscWindow.opener=myURL;



}else if (browserType.charAt(0)=="M"){

miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;



}else{



miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,status=0,scrollbars="+scrolling+",resizable=0,left="+leftPos+",top="+topPos);

miscWindow.opener=self;

}



setTimeout("miscWindow.focus();",200);



}

function standardWindow(myURL,myName,myWidth,myHeight){

	if(screen){

		leftPos = screen.width/2-(myWidth/2);
		topPos = screen.height/2-(myHeight/2);

	}

	if (browserType=="N2"){
		miscWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		miscWindow.opener=self;
		miscWindow.opener=myURL;
	}else if (browserType.charAt(0)=="M"){
		miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		miscWindow.opener=self;
	}else{
		miscWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		miscWindow.opener=self;
	}
		setTimeout("miscWindow.focus();",200);
}

//*****************************

function displayWindow(myURL,myName,myWidth,myHeight){

	if(screen){

		leftPos = screen.width/2-(myWidth/2);
		topPos = screen.height/2-(myHeight/2);

	}

	if (browserType=="N2"){
		disWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left="+leftPos+",top="+topPos);
		disWindow.opener=self;
		disWindow.opener=myURL;
	}else if (browserType.charAt(0)=="M"){
		disWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left="+leftPos+",top="+topPos);
		disWindow.opener=self;
	}else{
		disWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left="+leftPos+",top="+topPos);
		disWindow.opener=self;
	}

	setTimeout("disWindow.focus();",200);
}

//*****************************

function loginWindow(myURL,myName,myWidth,myHeight){

	if(screen){

		leftPos = screen.width/2-(myWidth/2);
		topPos = screen.height/2-(myHeight/2);

	}

	if (browserType=="N2"){
		logWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
		logWindow.opener=myURL;
	}else if (browserType.charAt(0)=="M"){
		logWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
	}else{
		logWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
	}

setTimeout("logWindow.focus();",200);

}
//*****************************

function galleryWindow(myURL,myName,myWidth,myHeight){

	if(screen){

		leftPos = screen.width/2-(myWidth/2);
		topPos = screen.height/2-(myHeight/2);

	}

	if (browserType=="N2"){
		logWindow=window.open("",myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
		logWindow.opener=myURL;
	}else if (browserType.charAt(0)=="M"){
		logWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
	}else{
		logWindow=window.open(myURL,myName,"width="+myWidth+",height="+myHeight+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left="+leftPos+",top="+topPos);
		logWindow.opener=self;
	}

setTimeout("logWindow.focus();",200);

}

//*****************************

function closeWindow(){

	if(miscWindow && !miscWindow.closed){
		miscWindow.close();
	}
}
