ï»¿	/*
	 * common routines
	 * org.home.kamara.dev 20080517
	 */
	
	/*
	 * The starting routine is attached to the
	 * page including the script.
	 */
	window.onload = startUp;
	
	
	/*
	 * this function is called at body.onLoad, so
	 * if there is a function that needs to be
	 * executed everytime a page is loaded, it
	 * should be called here.
	 */
	function startUp() {
		
		// new ElementMaxHeight();
		
		// correctExternalLinks();
		

	}
	
	
	/*
	 * forces the external links to open in a new
	 * window, in a manner that validates against
	 * XHTML Strict. This last one does not allow
	 * 'target="_blank"' anymore, but the DOM does.
	 */
	function correctExternalLinks() {
		// run through every a tag in the document
		var serverName = window.location.hostname;
		for (var index = 0; index <= (document.links.length - 1); index++) {
			var URL = document.links[index].href;
	
			// any links not containing the current server name are outbound.
			if (URL.indexOf('javascript') != 0) {
				if (URL.indexOf(serverName) < 0)
					document.links[index].target = "_blank";
				else
					document.links[index].target = "";
				// set link for IE no-cache
				if (URL.indexOf('?') > -1 && URL.indexOf('#') < 0) {
					document.links[index].href = document.links[index].href + "&_dc=" + (new Date).getTime();
				}
			} else {
				document.links[index].target = "";
			}
		}
		
		return true;
	}

	



	/* Modified to support Opera */

	function bookmark(){
		var title = document.title;
		var url = document.URL;
		if (window.sidebar) // firefox
			window.sidebar.addPanel(title, url, "");
		else if(window.opera && window.print){ // opera
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		}
		else if(document.all)// ie
			window.external.AddFavorite(url, title);
	}

	function mailpage() {
		var mail_str = "mailto:mail_destinatario@dominio.com?subject=" + document.title;
		mail_str = mail_str + "&body=Le han recomendado la siguiente pÃ¡gina: "+document.title+" ("+document.URL+").";
		location.href = mail_str;
	}
	
	function mailpage2() {
		var subject = document.title;
		var body = escape('Le han recomendado la siguiente web: ')+document.title+' ('+document.URL+').';
		location.href = 'mailto:mail_destinatario@dominio.com?subject='+subject+'&body='+body;
	}


	function openWindow(strUrl, strWindowName, strWindowFeatures){
	    windowName = strWindowName;
	    if (windowName == null)
	       windowName = '';
	
	    if (strWindowFeatures != null) {
	       window.window.open(strUrl, windowName, strWindowFeatures);
	    } else {
	      window.window.open(strUrl, windowName, 'location=0,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1,fullscreen=0,width=600,height=450');
	    }
	}

	function shopping() {
		var mail_str = "mailto:jgarciamendoza@matchgolf.es?subject=Tienda Online";
		mail_str = mail_str + "&body=EstarÃa interesado en el siguiente artÃculo: \r\n\r\nNombre: \r\nApellidos: \r\nDirecciÃ³n: \r\nMail: \r\nTelefono: \r\n\r\nProducto: \r\nTalla (Caballero M,L,XL, SeÃ±ora: S,M): \r\n\r\ncoste de envÃo de 10â‚¬ (PenÃnsula y Baleares)\r\n\r\nEn seguida nos pondremos en contacto con Ud. para confirmar su pedido.\r\n";
                location.href = mail_str;
	}