﻿/*
	Opens a new window with the provided url and dimension
	
	@param url the url to open	
	@param width the window width
	@param height the window height
*/
function openPopup(url, width, height)
{
	if (url != null)
	{
		if (width != null && height != null)
		{	
			window.open(url, "", "width=" + width +", height=" + height +", scrollbars=yes, resizable=no");
		}
		else
		{
			window.open(url, "", "scrollbars=yes, resizable=yes");
		}		
	}
}

/*
	Swaps an image to the given image url
*/
var swapActive = 1;
function swapImage(imageUrl,index)
{
	
	var active_el = "imgdiv_"+swapActive;
	var active2_el = "imgdiv_"+index;
	
	if (swapActive != index)
	{

	  document.getElementById(active_el).style.display = "none";
	  document.getElementById(active2_el).style.display = "inline";
	  swapActive = index;
	  
	}
	//document["EventImage"].src = imageUrl;
	//return true;
}
function body_loaded()
{
  // Try to load more early: (disabled in lighbox so.
  //initLightbox();
}



function loadTracker(desc) {
    
    
    var myurl = et_trackerPage;
	var myvars = "et_cid=24&et_lid=35&et_sub="+desc;
	// iframe for tracking:
    sendeHTTPRequest('POST',myurl,myvars);



}

 // Show hint to enlarge image with mouseover:
function mag_over(id) {
    document.getElementById(id).style.display = "inline";
 }

function mag_out(id) {
      document.getElementById(id).style.display = "none";
  }

function widget_list ( id , text , type )
{
var html = "<div class='product'><div class='productCompact'><div class='top'><div class='thumbnail'><a href='http://www.geschenkidee-erlebnis.de/Jochen-Schweizer/pages/" + id + ".html'><img src='http://www.geschenkidee-erlebnis.de/Jochen-Schweizer/widgets/"+ id +".gif' height='92' width='109' /></a></div><span class='name'><a class='productlink' href='http://www.geschenkidee-erlebnis.de/Jochen-Schweizer/pages/" + id +".html'>" + text + "</a></span></div><div class='bottom'><div class='price'><div class='key'>" + type + ": </div><div class='value' style='text-decoration:none'><a href='http://www.geschenkidee-erlebnis.de/Jochen-Schweizer/pages/" + id + ".html'>Ansehen</a></div></div></div></div><div class='clear'></div></div>";
document.write(html);
}
