function getParameter(queryString, parameterName) {
   // Add "=" to the parameter name (i.e. parameterName=value)
   var parameterName = parameterName + "=";
   if ( queryString.length > 0 ) {
      // Find the beginning of the string
      begin = queryString.indexOf ( parameterName );
      // If the parameter name is not found, skip it, otherwise return the value
      if ( begin != -1 ) {
         // Add the length (integer) to the beginning
         begin += parameterName.length;
         // Multiple parameters are separated by the "&" sign
         end = queryString.indexOf ( "&" , begin );
      if ( end == -1 ) {
         end = queryString.length
      }
      // Return the string
      return unescape ( queryString.substring ( begin, end ) );
   }
   // Return "null" if no parameter has been found
   return "null";
   }
}

function replaceLoading(nodeId, loadingImageSrc) {
	center = document.createElement('center');
	loadingImage = document.createElement('img');
	loadingImage.alt = "loading";
	loadingImage.title = "loading";
	loadingImage.align = "center";
	loadingImage.src = loadingImageSrc;
	center.appendChild(loadingImage);
	node = $(nodeId);
	node.innerHTML = "";
	node.appendChild(center);
}

function writeGallery(galleryId) {
	var so = new SWFObject(siteResource + "/swf/slide.swf", "myGallery_" + galleryId, "700", "525", "8", "#FFF");
	so.addVariable("xmlfile", "/app/application?action=galleryXml%26sc=" + siteCode + "%26galleryId=" + galleryId);
	so.addVariable("ancho", "700");
	so.addVariable("alto", "525");
	so.addParam("wmode", "opaque");
	so.addParam("wmode", "transparent");
	so.addParam("allowScriptAccess", "always");
	so.write("galleryBox");
	$("galleryBox").show();
}

function trackPage(pageUrl) {
	COPESATracker._trackPageview(pageUrl);
	cert_registerHit(25569, pageUrl);
}

function marcaImagenVista() {
	trackPage(pathTrackGalleries);
}