Je ten script spravne. V potu tváře jsem jej vydoloval z jednoho templaitu.
<!-- ZACATEK GALLERY SKRIPTU -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="template" content="basic white">
<script language="JavaScript" type="text/javascript">
<!--
function populate()
{
document.getElementById('targetimg').src = document.getElementsByTagName("A")[1].href;
var content=document.getElementById('wrapper').innerHTML;
if (document.all)
{
var fixie= new RegExp(/src="[S*s][^"]*"|href="[S*s][^"]*/g);
var tc= content.match(fixie)
for (i=0; i<tc.length; i++)
{
var tm = new Array(tc.length)
tm[i]=tc[i];
tc[i]=searchAndReplace(tc[i]," ","_")
content=searchAndReplace(content, tm[i], tc[i])
}
}
else
{
content=searchAndReplace(content, "%20", "_")
}
var re = new RegExp(/w*.[a-z]{2,4}$/)
var weblocation=new String( window.location.href );
weblocation = weblocation.replace(re,"");
if (weblocation.indexOf('http://') !=-1)
{
while (content.indexOf('src="im') != -1)
{
content= replaceString(content,'src="im','src="'+weblocation+'im' )
content= replaceString(content,'href="im','href="'+weblocation+'im' )
}
document.getElementById('wrapper').innerHTML=content;
document.getElementById('texty').value=content;
}
else
{
document.getElementById('texty').value="For this template to work correctly this page has to be published to a website.";
}
document.getElementById('wrapper').innerHTML=content;
document.getElementById('targetimg').src = document.getElementsByTagName("A")[1].href;
}
function searchAndReplace(holder, searchfor, replacement)
{
temparray = holder.split(searchfor);
holder = temparray.join(replacement);
return (holder);
}
// extract front part of string prior to searchString
function getFront(mainStr,searchStr){
foundOffset = mainStr.indexOf(searchStr);
if (foundOffset == -1) {
return null;
}
return mainStr.substring(0,foundOffset);
}
// extract back end of string after searchString
function getEnd(mainStr,searchStr) {
foundOffset = mainStr.indexOf(searchStr);
if (foundOffset == -1) {
return null;
}
return mainStr.substring(foundOffset+searchStr.length,mainStr.length);
}
// insert insertString immediately before searchString
function insertString(mainStr,searchStr,insertStr) {
var front = getFront(mainStr,searchStr);
var end = getEnd(mainStr,searchStr);
if (front != null && end != null) {
return front + insertStr + searchStr + end;
}
return null;
}
// remove deleteString
function deleteString(mainStr,deleteStr) {
return replaceString(mainStr,deleteStr,"");
}
// replace searchString with replaceString
function replaceString(mainStr,searchStr,replaceStr) {
var front = getFront(mainStr,searchStr);
var end = getEnd(mainStr,searchStr);
if (front != null && end != null) {
return front + replaceStr + end;
}
return null;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="populate()">
<embed style="display:none;"></embed>
<div id="wrapper">
<table width="80%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td width="60%" align="right" valign="top"><img src="" name="targetimg" id="targetimg"><div id="desc"> </div><p style="color:#999">
<td width="40%" align="left" valign="top">
<div style="position:relative; margin:10px;width:75px;height:75px;overflow:hidden; float:left;" >
<a href="obrazek" onClick="document.getElementById('targetimg').src=this.href;document.g etElementById('desc').childNodes[0].nodeValue='';return false"><img style="" src="obrazek" width=75 border=0 ></a>
</div>
<div style="position:relative; margin:10px;width:75px;height:75px;overflow:hidden; float:left;" >
<a href="obrazek" onClick="document.getElementById('targetimg').src=this.href;document.g etElementById('desc').childNodes[0].nodeValue='';return false"><img style="" src="obrazek" width=75 border=0 ></a>
</div>
<div style="position:relative; margin:10px;width:75px;height:75px;overflow:hidden; float:left;" >
<a href="obrazek" onClick="document.getElementById('targetimg').src=this.href;document.g etElementById('desc').childNodes[0].nodeValue='';return false"><img style="" src="obrazek" width=75 border=0 ></a>
</div>
<div style="position:relative; margin:10px;width:75px;height:75px;overflow:hidden; float:left;" >
<a href="obrazek" onClick="document.getElementById('targetimg').src=this.href;document.g etElementById('desc').childNodes[0].nodeValue='';return false"><img style="" src="obrazek" width=75 border=0 ></a>
</div>
<!--
<div style="position:relative; margin:10px;width:75px;height:75px;overflow:hidden; float:left;" >
<a href="images/Botky3.jpg" onClick="document.getElementById('targetimg').src=this.href;document.g etElementById('desc').childNodes[0].nodeValue='';return false"><img style="" src="images/Botky3.jpg" width=75 border=0 ></a>
-->
</div>
<!-- KONEC GALLERY SKRIPTU-->
</td></tr>
</table>
</div>
<table width="80%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr><Td colspan="2">
<SCRIPT LANGUAGE="JavaScript">
setTimeout("document.images.eBayBig.style.display='none'",300);
</script>
</body>
</html>