function dismap(pic)
	{
		document.upload.bigmap.src=pic;
	}
function dispic(pic)
	{
		document.upload.bigpic.src=pic;
	}
function addnllink()
{	found=true;
	if(!(x=findObject(document.body,'alt','Impressum')))
		if(!(x=findObject(document.body,'alt','Imprint')))
			if(!(x=findObject(document.body,'alt','Mentions obligatoires')))
				if(!(x=findObject(document.body,'alt','Legale meldingen')))
					found=false;
	if(!(line=findObject(document.body,'src','http://www.carpediem.com/images/spacer_grey.gif')))
		found=false;
	if(found==true)
	{	w=line.width-231-x.width;
		x=x.parentNode.parentNode;
		html=x.innerHTML;
		html+="<img src='images/spacer.gif' height=1 width="+w+"><a href='registerNL.php4'><img src='images/nwsletterbutt.gif' border=0></a>"
		x.innerHTML=html;
	}
}


function getChildren(ob)
{	if(ob.children)
		return ob.children;
	else
		return ob.childNodes;
}

function getFirstChild(ob)
{	if(ob.children)
		return ob.children[0];
	s=ob.childNodes;
	var i=0;
	for(x in s)
		if(s[x].tagName)
			return s[x];
}

function findObject(ob,prop,val)
{	var x;
	var found=false;
	if(ob[prop])										// object has the prop?
		if(ob[prop]==val)								// ...& its filled with the right data?
			return ob;									// return it!
	var childs=getChildren(ob);
	for(x in childs)							//...or start browsing its children!
	{	if(typeof childs[x] =='object')	// browsable child found?
			if(ret=findObject(childs[x],prop,val))	// start function recursively
				return ret;	
	}
	return false;
}

/*********************
*Preload und Rollover*
*********************/
//if(document.location.href=='http://www.carpediem.com/Aktuell.html')
//{	window.open('http://s-web1.at/carpediem/form.php','url','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,innerWidth=500,innerHeight=300,width=500,height=300')
//
//}



function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		details =  newImage("images/details_over.gif");
		ueber =    newImage("images/icon_left_over.gif");
		drucken =  newImage("images/icon_over.gif");
		preloadFlag = true;
	}
}

function iconleftswap(name,over)
{				
	if(window.document.images) 
	{
		if (over)
			window.document.images[name].src = "images/icon_left_over.gif";
		else
			window.document.images[name].src = "images/icon_left.gif";
	}
}
function iconswap(name,over)
{				
	if(window.document.images) 
	{
		if (over)
			window.document.images[name].src = "images/icon_over.gif";
		else
			window.document.images[name].src = "images/icon.gif";
	}
}
function iconswap2(name,over,bild)
{				
	if(window.document.images) 
	{
		if (over)
			window.document.images[name].src = "images/"+bild;
		else
			window.document.images[name].src = "images/"+bild;
	}
}

function detailswap(name,over)
{				
	if(window.document.images) 
	{
		if (over)
			window.document.images[name].src = "images/details_over.gif";
		else
			window.document.images[name].src = "images/details.gif";
	}
}



function popup2(url, name, height, width, scro)
{
if (!scro) scro="no";
  var popwin;
  var opts = "toolbar=no,status=no,location=no,menubar=no,resizable=no"; opts += ",height=" + height + ",width=" + width + ",scrollbars="+scro;
if(url.search(/[a-z]{3,}:\/\//i))
{	url="http://www.carpediem.com/"+url;
}
  popwin = window.open(url, name, opts);
  if(screen.availWidth >= width && screen.availHeight >= height)
  {popwin.moveTo((screen.availWidth-width)/2,(screen.availHeight-height)/2);} 
  popwin.focus();
}

	function popup(url,title,w,h,scroll)
	{	breite = screen.width - 10;
		hoehe = screen.height - 30;
if(url.search(/[a-z]{3,}:\/\//i))
{	url="http://www.carpediem.com/"+url;
}
		
		if (document.all)
		  newWin=window.open(url, "popup", "fullscreen=1, left=0, top=0, menubar=no, resizable=no, status=no, scrollbars=no"); 


		else (document.layers)
			newWin=window.open(url, "popup", "width="+breite+",height="+hoehe+",left=0,top=0, fullscreen=1, menubar=no, resizable=no, status=no, scrollbars=no"); 
	

	}

var flash_required_version = 5;
var flash_installed = false;

if (navigator.plugins && navigator.plugins.length > 0)
	{
	if (navigator.plugins["Shockwave Flash"])
		{
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i)
			{
			if (isNaN(parseInt(words[i]))==true)
				continue;
			if (parseInt(words[i]) >= flash_required_version)
				{
				flash_installed = true;
				continue;
				}
			}
		}
	}
if(navigator.appVersion.indexOf('MSIE 4.5') != -1) flash_installed = false;
awmm=new Array;
function ohneflash(pfad)
	{
		pfad3 = pfad.replace(/eng\//,"");
		pfad = pfad3.replace(/frn\//,"");
		pfad3 = pfad.replace(/flm\//,"");
	pfad2 = pfad3.replace(/\//,"_");
	pfad = pfad2.replace(/\//,"_");
	pfad2 = pfad.replace(/\//,"_");
	document.write('<TABLE WIDTH=770 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC="images/navi_main_'+pfad2+'.jpg" WIDTH=770 HEIGHT=227 ALT=""></TD></TR><TR><TD><IMG SRC="images/navi_anfang_'+pfad2+'.jpg" WIDTH=42 HEIGHT=14 ALT=""></TD><TD height=14 id="awmAnchor-cpdm_menu" class="awmAnchor"><IMG SRC="images/spacer.gif" WIDTH=581 HEIGHT=14 ALT=""></TD><TD ROWSPAN=2><IMG SRC="images/navi_rechts.gif" WIDTH=147 HEIGHT=28 ALT=""></TD></TR><TR><TD COLSPAN=2><IMG SRC="images/navi_unten.gif" WIDTH=623 HEIGHT=14 ALT=""></TD></TR></TABLE>');
	}

