/*
	Panamá, 2005
	www.acropolis.org.pa
	oinapan2005.js
	Programado por Dimension-e para Nueva Acrópolis Panamá.
	www.dimension-e.net
	
	Todos los derechos reservados
*/


function bookmark(){
	
	url = window.location;
	title = document.title;
	n = navigator.appName;
	/*
	if(n.indexOf('Microsoft')!=-1) {
			window.external.AddFavorite(url,title);
	} else {
			alert("Para agregarnos a tus carpetas de favorito, aprieta la tecla 'ctrl' y 'D' a la vez");		
	}
	*/
	// Tomado de la extensión ah_bookmark. Funciona también con Firefox :)
	
	if (window.sidebar) { // Mozilla code...
		window.sidebar.addPanel(title, url,'');
	} else if( document.all ) { // MSIE code ...
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) { // Opera... but what does it do?
		return true;
	} else {
		alert("Para agregarnos a tus carpetas de favorito, aprieta la tecla 'ctrl' y 'D' a la vez");			
	}
	
	
}

function limpiarValor(objetoDelFormulario) {
	if(objetoDelFormulario.changed != 1) {
		objetoDelFormulario.oldValue = objetoDelFormulario.value;
		newValue = '';
		objetoDelFormulario.value = newValue;
		}
	}
	
function restituirValor(objetoDelFormulario) {
      if(objetoDelFormulario.value == '') { //tomar nota que aquí debemos emplear doble signo de igual
		objetoDelFormulario.value = objetoDelFormulario.oldValue;
		objetoDelFormulario.changed = 0;
		}  else {
		objetoDelFormulario.changed = 1;
		}
}


/* Flash Navigation Control */


 function flashSeen(cookieSeen,swfFrame) {
	var myCookie = readCookie(cookieSeen);
		if (myCookie) {
	   	interactive(swfFrame);
	}  
 }
 
 function readCookie(name){
	 var nameEQ = name + "=";
	 var ca = document.cookie.split(';');
	 for(var i=0;i < ca.length;i++) {
 		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
 	return null;
}
/*
 function checkHash() {
 
 	h = window.location.hash;
	if(h == "#projects") {
		interactive(134);
	}
    if(h == "#terms") {
		interactive(185);
	}
 }
*/
 function interactive(frame) {
 	flashMovieName = "TheMovie"; 
	navname = navigator.appName;
		if(navname.indexOf('Microsoft')!=-1){
			myMovie = eval("window."+flashMovieName);			
		} else {
			myMovie = eval("window.document."+flashMovieName);
		}
	myMovie.GotoFrame(frame);
	// myMovie.StopPlay();
 }