/*********************************************************************
** Description : Javascript functions for Patricia Sturla Studios   **
** File Name   : pss.js     		                				**
** Version     : 1.1        							            **
** Author      : LP/CMP       					            		**
** Website     : www.patriciasturlastudio.com		         		**
** Created     : 20 May 2005                                        **
** Updated     : 19 July 2005        			                    **
** Email	   : webmaster@patriciasturlastudio.com                 **
**********************************************************************/

if (window!= top) //breaks out from framesets 
top.location.href=location.href

/***********************************/

function stopErrors() {  //stops errors 
return true;
}
window.onerror = stopErrors;

/***********************************/

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

/***********************************/

var newWindow = null;
function openWindow()
{
window.open("http://www.patriciasturlastudio.com/mailinglist.htm","Subscribe","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=550")
}

function closeWindow()
{
	if (newWindow !=null) {
		newWindow.close();
		newWindow = null;
	}
}

function toggleWindow()
{
	if (newWindow == null) {
		widthHeight = 'height=' + windowHeight + 'width=' + windowWidth;
		newWindow = window.open();
		newWindow.focus()
	}
	else {
		newWindow.close();
		newWindow = null;
	}
}

/***********************************/ 

function slideshow1()
{
  slideshow1_window = 
    window.open("http://www.patriciasturlastudio.com/ss.studiola.htm","slideshow1","width=750,height=560,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");
}

function slideshow2()
{
  slideshow2_window = 
    window.open("http://www.patriciasturlastudio.com/ss.studiooc.htm","slideshow2","width=750,height=560,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");
}

function slideshow3()
{
  slideshow3_window = 
    window.open("http://www.patriciasturlastudio.com/ss.patricia.htm","slideshow3","width=750,height=560,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");
}

function slideshow4()
{
  slideshow4_window = 
    window.open("http://www.patriciasturlastudio.com/ss.events.htm","slideshow4","width=750,height=560,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");
}

function slideshow5()
{
  slideshow5_window = 
    window.open("http://www.patriciasturlastudio.com/ss.kids.htm","slideshow5","width=750,height=560,top=10,left=10,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=yes,location=no");
}


/******/ 

function printpage()
{ //print function
window.print()
}

/***********************************/ 


function right(ns_e) {  //disables rightclick 
  if (navigator.appName == 'Netscape' &&
  (ns_e.which == 3 || ns_e.which == 2)) {
    // display an error message
    alert("You may not right click");
    // return false so that the click event is not done
    return false;
  } else if (navigator.appName == 'Microsoft Internet Explorer' &&
  (event.button == 2 || event.button == 3)) {
    // basically the same steps for Internet Explorer
    alert("You may not right click");
    return false;
  }
  return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) {
  window.captureEvents(Event.MOUSEDOWN);
}
if (document.layers) {
  window.captureEvents(Event.MOUSEUP);
}
window.onmousedown=right;
window.onmouseup=right;

/***********************************/ 