Ary = new Array;
Ary = Ary.concat (new Array ("GPAC", "Greenpeace Gruppe Aachen", "de", "greenpeace", "aachen"));
Ary = Ary.concat (new Array ("GPD",  "Greenpeace Deutschland", "de", "greenpeace", "photo"));
Ary = Ary.concat (new Array ("GPEN", "Greenpeace-energy", "de", "greenpeace-energy",  "info"));
Ary = Ary.concat (new Array ("GPM",  "Greenpeace Magazin", "de", "greenpeace",  "gpm.germany"));
Ary = Ary.concat (new Array ("GPI",  "Greenpeace International", "org", "ams.greenpeace",  "cjohnson"));
Ary = Ary.concat (new Array ("GFOF", "Gesellschaft f&uuml;r &ouml;kologische Forschung", "de", "oekologische-forschung", "info"));
Ary = Ary.concat (new Array ("RRW",  "Rettet den Regenwald", "de", "t-online", "paczian.presse"));
Ary = Ary.concat (new Array ("End"));

var ArIndex = 0;
var Seite = document.URL;
var Grafik = "";
var ParseOK = false;

function ParseUrl()
{
	Pos = Seite.lastIndexOf("#");
	if (Pos < 0) return;
	
	Grafik = Seite.slice(Pos +1);

	Pos = Grafik.indexOf("&");
	if (Pos < 0) return;
	
	CopyOwner = Grafik.slice(0, Pos);

	for (ArIndex=0; ArIndex<Ary.length; ArIndex+=5)
	{
		if (Ary[ArIndex] == CopyOwner) break;
		if (Ary[ArIndex] == "End") return;
	}
	
	Grafik = Grafik.slice(Pos+1);

	Pos = Math.max(Seite.lastIndexOf("\\"), Seite.lastIndexOf("/"));
	if (Pos < 0) return;
	
	Grafik = Seite.slice(0, Pos+1) + Grafik;

	ParseOK = true;
}

iPos  = Seite.lastIndexOf("/") +1;
iEnd  = Seite.lastIndexOf(".htm");
if (iEnd < 0) iEnd = Seite.length;

if (Seite.indexOf("http:") >= 0)
{
	sPage = "http://www.greenpeace.de/aachen/" +Seite.substring(iPos, iEnd);
	Cntr = new Image(1,1); 
	Cntr.src = "http://www.DownloadCounter.de/counter.pl?file="+sPage+"&user=gp_aachen";
	window.status= " ";
}

// Anti Spam
function WriteMail(Recipient, Country, Domain, Vor)
{
	document.write("Email an <b><a href=\"javascript:SendMail('"+Recipient+"','"+Country+"','"+Domain+"','"+Vor+"');\">"+Recipient+"</a></b>");	
} 

function WriteForm()
{
	var Ctry = "de";
	var Dom = "gaia";
	var Vor = "gp-aachen";
	document.write("<input type='hidden' name='recipient' value='"+Vor+"@"+Dom+"."+Ctry+"'>");
} 

function SendMail(Recipient, Country, Domain, Vor)
{
	var email = Vor + "@" + Domain + "." + Country;
	MailStr = "mailto:" + Recipient + "<" + email + ">?subject=Email von der Greenpeace Aachen Homepage";
	if (Grafik != "") MailStr += "&body=Copyright Anfrage:%0A%0AIch bitte um Erlaubnis das Bild%0A" + Grafik + "%0A%0Afuer den Zweck : XXX%0A%0A(  )privat / (  )gewerblich%0A%0Averwenden zu duerfen.";
	else MailStr += "&body=Hallo " + Recipient + "%0A%0A";
	window.open(MailStr);
}

function OpenCopy(Reference)
{
	window.open("copyright.html"+Reference,"","width=600,height=510,scrollbars=yes,resizable=yes,screenX=100,screenY=100");
}



