/* If you take this script i will personally KILL you...And remmember I'm a mean motherfucker!!!
* Copyright (c) 1998, Wicap Interactive
* I will sue everyone that uses this script witout prior notice!
* Mail me and I'm sure we can come up to an agreement!
* wicap@wicap.com
*/
var cpcpcp, infos;
var arr = new Array();
var spe=0;var spe1=0;
GetCP();
function GetCP() {
if(document.all) window.document.onclick=iCookie;
}

			  
function iCookie (v) {

var el=window.event.srcElement;
var temp=el.tagName.toLowerCase();

if (temp=='a' || temp=='img') {
	if (temp=='img') {	
		if(spe1==0){
			tempArr=document.all.tags("IMG");
			for(d=0;d<tempArr.length;d++) {
				if(tempArr[d].src.indexOf('.jpg')>-1) {
					arr[arr.length]=tempArr[d];
				}
			}
			spe1++;
		}
		for (var i=0;i<arr.length;i++) if (arr[i]==el) break;
		if (el.src.indexOf('.jpg')>=0) {
			infos=i;
			temp=arr[i].src
			if(temp.indexOf('tednas')>-1) temp=temp.substring(0,temp.length-4) + ".gif";
			el=rS(temp,"html2","pics");
			cpcpcp=el;
			spe=0;
			atw=window.open("",'','scrollbars=1, fullscreen=1, resizable=0, left=0, top=0');
			atw.document.write("<html><head>" + "<sc"+"rip"+"t>document.write('<scr'+'ipt src=/html2/test.js></sc'+'ript>');setTimeout('if(parent.window.opener.spe==0) {parent.window.opener.spe=1;window.location.reload(true);}',2)</" +"sc"+"ript>" + "<style>.vie { font-family:verdana;font-size:11px;font-weight:700;text-decoration:none;color:black;}</style></head><body topmargin=0 leftmargin=0><img src='"+cpcpcp+"' id=vpic border=0><div id=pal style='z-index:9999;position:absolute;left:500;top:3;width:337'><table align=right border='0' cellpadding='0' cellspacing='0'><td><img style='CURSOR: move' ondragstart='framemover()' onmousedown='getcord()' src='/html2/images/horn2/pla0.gif'></td><td><a href='javascript:window.close();'><img src='/html2/images/horn2/pla1.gif' border=0></a></td></table><img src='/html2/images/pixel.gif' width=1 height=20><br><table align=right border='0' cellpadding='0' cellspacing='0'><tr><td valign=top><img src='/html2/images/horn2/boj0.gif'></td><td bgcolor='rgb(204,204,204)' valign=top><img height=100% width=4 src='/html2/images/pixel.gif'></td><td valign=top bgcolor='rgb(204,204,204)'><table align=right border='0' cellpadding='0' cellspacing='0'><tr><td colspan=4 height=6 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td height='3'  align='right' valign='bottom'><img src='/html2/images/horn2/p1.gif' height='3' width='3'></td><td height='3' background='/html2/images/horn2/m1.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height='3' align='left' valign='bottom'><img src='/html2/images/horn2/p2.gif' height='3' width='3'></td><td height=1 width=4 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td width='3' background='/html2/images/horn2/m4.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td id=pic00></td><td width='3' background='/html2/images/horn2/m2.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height=1 width=4 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td height='3' align='right' valign='top'><img src='/html2/images/horn2/p4.gif' height='3' width='3'></td><td height='3'  background='/html2/images/horn2/m3.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height='3' align='left' valign='top'><img src='/html2/images/horn2/p3.gif' height='3' width='3'></td><td height=1 width=4 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td colspan=4 height=2 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr></table></td><td valign=top bgcolor='rgb(204,204,204)'><img height=100%  src='/html2/images/pixel.gif' width=2></td><td valign=top bgcolor='rgb(204,204,204)'><table align=right border='0' cellpadding='0' cellspacing='0'><tr><td colspan=4 height=6 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td height='3'  align='right' valign='bottom'><img src='/html2/images/horn2/p1.gif' height='3' width='3'></td><td height='3' background='/html2/images/horn2/m1.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height='3' align='left' valign='bottom'><img src='/html2/images/horn2/p2.gif' height='3' width='3'></td><td height=1 width=3 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td width='3' background='/html2/images/horn2/m4.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td id=pic10></td><td width='3' background='/html2/images/horn2/m2.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height=1 width=3 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td height='3' align='right' valign='top'><img src='/html2/images/horn2/p4.gif' height='3' width='3'></td><td height='3'  background='/html2/images/horn2/m3.gif'><img src='/html2/images/pixel.gif' height='3' width='3'></td><td height='3' align='left' valign='top'><img src='/html2/images/horn2/p3.gif' height='3' width='3'></td><td height=1 width=3 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr><tr><td colspan=4 height=2 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif'></td></tr></table></td><td bgcolor='rgb(204,204,204)'><img width=1 height=100% src='/html2/images/pixel.gif'></td></tr><tr><td></td><td bgcolor='rgb(204,204,204)'></td><td class=h bgcolor='rgb(204,204,204)' align=center id=pic01></td><td bgcolor='rgb(204,204,204)'></td><td align=center class=h bgcolor='rgb(204,204,204)' id=pic11></td><td bgcolor='rgb(204,204,204)'></td></tr><tr><td></td><td colspan=5 bgcolor='rgb(204,204,204)'><img src='/html2/images/pixel.gif' height=3></td></tr><tr><td></td><td colspan=5 bgcolor='rgb(204,204,204)' align=center><a href='/html2/postcard.php?img="+cpcpcp+"'><img src='/html2/images/horn2/postcard.gif' border=0></a></td></tr><tr><td></td><td align=left valign=top><img src='/html2/images/horn2/o0.gif' height=3></td><td  bgcolor='rgb(204,204,204)'></td><td bgcolor='rgb(204,204,204)'></td><td bgcolor='rgb(204,204,204)'></td><td bgcolor='rgb(204,204,204)'></td></tr></table></div><sc"+"ript>pal.style.pixelLeft=screen.width - pal.offsetWidth - 18;	</scr"+"ipt></body></html>");
			atw.focus();
			window.event.returnValue=false;
		}
	}
}
}


function rS(theString,sub,newSub) { 

	var after, afterstart;
	var i=theString.indexOf(sub);            
	while (i>=0) {

		after=theString.substring(i+sub.length,theString.length);
		theString=theString.substring(0,i)+newSub+after; 

		afterstart=i+newSub.length;
		i=after.indexOf(sub);
		if (i>=0) i=afterstart+i;
	}
	return theString;

}
