var cgiloc = "http://www.t-n-s.de/cgi-bin/tnscard.cgi";
var i = 0;


function showbutton(){
	i = 0;
	if(navigator.appName=="Microsoft Internet Explorer"){
		div1.innerHTML = "<center><form name='form1' method='post' action=''><input type='button' value='Dieses Bild als E-Card verschicken' onclick='showform();'></form></center>";
	}else{
		document.write ("<center><a href=" + cgiloc + "?action=sendopic&opic=" + document.images[3].src + ">Dieses Bild als E-Card verschicken</a></center>");
	}
}


function showform(){
	div1.innerHTML = "<form name='form1' method='post' action='" + cgiloc + "'><table width='100%' border=0 cellspacing=0><tr><td width='23%'> "+
"<div align='right'><input type='hidden' name='pictureid' value="+ document.images[3].src +"><input type='hidden' name='action' value='sendcard'>"+
"Dein Name:</div></td><td width='77%'><input type='text' name='FromName'></td></tr><tr><td width='23%'><div align='right'>Deine E-Mail Adresse:</div>"+
"</td><td width='77%'><input type='text' name='FromMail'></td></tr><tr><td width='23%'><div align='right'>Name des Empfängers </div></td><td width='77%'> "+
"<input type='text' name='ToName'></td></tr><tr><td width='23%'><div align='right'>E-Mail Adresse des Empfängers: </div></td><td width='77%'><input type='text' name='ToMail'></td></tr><tr>"+
"<td width='23%'><div align='right'>Deine Nachricht: </div></td><td width='77%'> <textarea name='testmes' rows=10 cols=50></textarea></td></tr><tr>"+
"<td width='23%'>&nbsp; </td><td width='77%'> <input type='submit' name='Abschicken' value='Verschicken'> <input type='button' name='button1' value='Abbrechen' onclick=DoCancel()></td></tr></table></form>";

	scrolldown();
}


function scrolldown(){
	scroll(1,i*3);
	i++;
	if (i<120){
		setTimeout('scrolldown()',20);
	}
}


function DoCancel(){
	div1.innerHTML = "";
	scroll(1,0);
	showbutton();
}


showbutton();




