Layer erstellen
Dieser Layer wird 1x pro Besucher angezeigt.
Wobei der Inhalt/Aussage frei erstellbar ist!1.Setzen Sie diesen Code zwischen <HEAD> und </HEAD>:
<script language="JavaScript">
function getCookie(NameOfCookie){
if (document.cookie.length > 0) {
begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1) {
begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end));
}
}
return null;
}
function setCookie(NameOfCookie, value, expiredays) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function delCookie (NameOfCookie) {
if (getCookie(NameOfCookie)) {
document.cookie = NameOfCookie + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function checkIt()
{
visited=getCookie('visited');
if (visited==null)
{
setCookie('visited','yes',180)
Hide('L1','','hide')
}
}
</script>
<script language="JavaScript">
<!--
function GetObj(n, d) {
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=GetObj(n,d.layers[i].document); return x;
}
function Hide() {
var i,p,v,obj,args=Hide.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=GetObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v;
setTimeout("Show('L1','','show')", 3000);
}
}
function MyObj(n, d) {
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MyObj(n,d.layers[i].document); return x;
}
function Show() {
var i,p,v,obj,args=Show.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MyObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v;
}
}
function NewObj(n, d) {
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=NewObj(n,d.layers[i].document); return x;
}
function HideIt() {
var i,p,v,obj,args=HideIt.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=GetObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v;
}
}
//-->
</script>
2.Setzen Sie diesen Code direkt in Ihren BODY-Tag:
onLoad="checkIt()"
3.Setzen Sie diesen Code innerhalb Ihrer BODY-Tags ein:
<div id="L1" style="position:absolute;width:300px;height:200px;z-index:1;visibility:hidden;left:80;top:80">
<table width="100%" border="1" cellspacing="0" cellpadding="5" height="100%">
<tr bgcolor="#000099">
<td height="20">
<div align="right"><img src="http://www.bilder-hochladen.net/files/3qkw-lr.jpg" width="20" height="18" onClick="HideIt('L1','','hide')"></div>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td>
<div align="center">
<font face="Verdana">Wir wünschen Ihnen viel Spass auf unserer Website!<br><a href="http://www.tratsch-ecke.de" target="_blank">Tratsch-Ecke</a></font>
</div>
</td>
</tr>
</table>
</div>