var message = "Copyright © www.fotopage.org : Daniel Bardman, Owner";
document.oncontextmenu = new Function("alert(message);return false");

function findObj(theObj, theDoc)
{
var p, i, foundObj;
if(!theDoc) theDoc = document;
if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
{
theDoc = parent.frames[theObj.substring(p+1)].document;
theObj = theObj.substring(0,p);
}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++) 
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}

function preload() { 
var a = preload.arguments;
document.imageArray = new Array(a.length);
	for (var n=0 ; n<a.length ; n++)
  	{
    document.imageArray[n] = new Image;
    document.imageArray[n].src = a[n];
}
}

function switchLang(lang) {
	//find div
	var thtml = findObj('stext');
	var fhtml;
	//begin switch
	switch(lang) {
		//english
		case "en":
		fhtml = "Photography, in my perspective, is a cultural meridian; an art which does not require any language or explanation. It is a self-expression which is universally understood by all people; it renders a partial answer, in a cultural sense, to the eternal question of what makes us human. The art of photography captures moments in space and time, freezing, so to speak, not only a scene, movement, etc. but also our emotions. It allows the viewer an appreciation of the experience – though never having witnessed the exact moment captured on film. With each image and without language, I hope to share my vision and passion for photography where emotions and imagination are without boundaries floating through languages, races and nations.";
			break;
		//french
		case "fr":
		fhtml = "À mon avis, la photographie est un art qui ne requiert aucune explication ou parole C'est la libre expression qui est compris universellement; nous y trouvons, dans le sens culturel, une réponse partielle à ce qui fait que nous sommes humains. L'art de la photographie capture certains moments dans le temps et l'espace, saisissant, non seulement une scène, un mouvement mais également nos émotions. Ça permet à celui qui regarde, d'apprécier - malgré qu'il n'a pas été témoin au moment exact où l'on a capturé la scène sur film. En image et sans parole, j'espère partager ma vision et ma passion pour la photographie où les émotions et l'imagination flottent à travers la race humaine et les nations.";
			break;
		//español
		case "sp":
		fhtml = "Fotografia, desde mi perspectiva, es un medio de expresion cultural; un arte el cual no requiere de lenguaje o explicacion.  Ella es una auto-expresion que es universalmente entendida por todas las personas; ofrece una respuesta parcial en el sentido cultural, a la pregunta eterna: ?Que es lo que nos hace humanos?  El arte de la photografia captura momentos en espacio y tiempo, congelando, en alguna manera, no solo una escena, un movimiento, etc., pero tambien nuestras emociones.  Ella permite al expectador una apreciacion de la experiencia -- aunque nunca teniendo que ser testigo del momento exacto que se ha capturado en filmica.  Con cada imagen y sin lenguaje, yo espero compartir mi vision y pasion por la fotografia donde emociones y la imaginacion no tienen barreras, flotando a traves de lenguages, razas y naciones.";
			break;
		//russian
		case "ru":
		fhtml = "<img src='images/ru.gif'>";
			break;
		//default: do nothing
		default:
			return;
	}
	thtml.innerHTML = fhtml;
}

function swap(img, src) {
	parent.document.getElementById(img).src = src;
}
