add old website sds v4
This commit is contained in:
39
content/files/old/sds_v4/scripts/alpha.js
Normal file
39
content/files/old/sds_v4/scripts/alpha.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Gradual-Highlight Image Script II-
|
||||
By J. Mark Birenbaum (birenbau@ugrad.cs.ualberta.ca)
|
||||
Permission granted to Dynamicdrive.com to feature script in archive
|
||||
For full source to script, visit http://dynamicdrive.com
|
||||
*/
|
||||
|
||||
nereidFadeObjects = new Object();
|
||||
nereidFadeTimers = new Object();
|
||||
|
||||
/* object - image to be faded (actual object, not name);
|
||||
* destop - destination transparency level (ie 80, for mostly solid)
|
||||
* rate - time in milliseconds between trasparency changes (best under 100)
|
||||
* delta - amount of change each time (ie 5, for 5% change in transparency)
|
||||
*/
|
||||
|
||||
function nereidFade(object, destOp, rate, delta){
|
||||
if (!document.all)
|
||||
return
|
||||
if (object != "[object]"){ //do this so I can take a string too
|
||||
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(nereidFadeTimers[object.sourceIndex]);
|
||||
|
||||
diff = destOp-object.filters.alpha.opacity;
|
||||
direction = 1;
|
||||
if (object.filters.alpha.opacity > destOp){
|
||||
direction = -1;
|
||||
}
|
||||
delta=Math.min(direction*diff,delta);
|
||||
object.filters.alpha.opacity+=direction*delta;
|
||||
|
||||
if (object.filters.alpha.opacity != destOp){
|
||||
nereidFadeObjects[object.sourceIndex]=object;
|
||||
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
|
||||
}
|
||||
}
|
||||
113
content/files/old/sds_v4/scripts/menu.js
Normal file
113
content/files/old/sds_v4/scripts/menu.js
Normal file
@@ -0,0 +1,113 @@
|
||||
// JavaScript Document
|
||||
//Pop-it menu- By Dynamic Drive
|
||||
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
|
||||
//This credit MUST stay intact for use
|
||||
|
||||
var linkset=new Array()
|
||||
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
|
||||
|
||||
linkset[0]='<div class="menuitems"><a href="../photos.html">Photograpy</a></div>'
|
||||
linkset[0]+='<hr>' //Optional Separator
|
||||
linkset[0]+='<div class="menuitems"><a href="http://javascriptkit.com">JavaScript Kit</a></div>'
|
||||
linkset[0]+='<div class="menuitems"><a href="http://freewarejava.com">Freewarejava</a></div>'
|
||||
|
||||
|
||||
////No need to edit beyond here
|
||||
|
||||
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
|
||||
var ns6=document.getElementById&&!document.all
|
||||
var ns4=document.layers
|
||||
|
||||
function showmenu(e,which){
|
||||
|
||||
if (!document.all&&!document.getElementById&&!document.layers)
|
||||
return
|
||||
|
||||
clearhidemenu()
|
||||
|
||||
menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
|
||||
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj
|
||||
|
||||
if (ie4||ns6)
|
||||
menuobj.innerHTML=which
|
||||
else{
|
||||
menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
|
||||
menuobj.document.close()
|
||||
}
|
||||
|
||||
menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
|
||||
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
|
||||
eventX=ie4? event.clientX : ns6? e.clientX : e.x
|
||||
eventY=ie4? event.clientY : ns6? e.clientY : e.y
|
||||
|
||||
//Find out how close the mouse is to the corner of the window
|
||||
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
|
||||
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY
|
||||
|
||||
//if the horizontal distance isn't enough to accomodate the width of the context menu
|
||||
if (rightedge<menuobj.contentwidth)
|
||||
//move the horizontal position of the menu to the left by it's width
|
||||
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
|
||||
else
|
||||
//position the horizontal position of the menu where the mouse was clicked
|
||||
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
|
||||
|
||||
//same concept with the vertical position
|
||||
if (bottomedge<menuobj.contentheight)
|
||||
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
|
||||
else
|
||||
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
|
||||
menuobj.thestyle.visibility="visible"
|
||||
return false
|
||||
}
|
||||
|
||||
function contains_ns6(a, b) {
|
||||
//Determines if 1 element in contained in another- by Brainjar.com
|
||||
while (b.parentNode)
|
||||
if ((b = b.parentNode) == a)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function hidemenu(){
|
||||
if (window.menuobj)
|
||||
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
|
||||
}
|
||||
|
||||
function dynamichide(e){
|
||||
if (ie4&&!menuobj.contains(e.toElement))
|
||||
hidemenu()
|
||||
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
|
||||
hidemenu()
|
||||
}
|
||||
|
||||
function delayhidemenu(){
|
||||
if (ie4||ns6||ns4)
|
||||
delayhide=setTimeout("hidemenu()",500)
|
||||
}
|
||||
|
||||
function clearhidemenu(){
|
||||
if (window.delayhide)
|
||||
clearTimeout(delayhide)
|
||||
}
|
||||
|
||||
function highlightmenu(e,state){
|
||||
if (document.all)
|
||||
source_el=event.srcElement
|
||||
else if (document.getElementById)
|
||||
source_el=e.target
|
||||
if (source_el.className=="menuitems"){
|
||||
source_el.id=(state=="on")? "mouseoverstyle" : ""
|
||||
}
|
||||
else{
|
||||
while(source_el.id!="popmenu"){
|
||||
source_el=document.getElementById? source_el.parentNode : source_el.parentElement
|
||||
if (source_el.className=="menuitems"){
|
||||
source_el.id=(state=="on")? "mouseoverstyle" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ie4||ns6)
|
||||
document.onclick=hidemenu
|
||||
90
content/files/old/sds_v4/scripts/progressbar.js
Normal file
90
content/files/old/sds_v4/scripts/progressbar.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// Progressbar - Version 2.0
|
||||
// Author: Brian Gosselin of http://scriptasylum.com
|
||||
// Featured on Dynamic Drive (http://www.dynamicdrive.com)
|
||||
// PUT THE NAMES OF ALL YOUR IMAGES THAT NEED TO BE "CACHED" IN THE "imagenames" ARRAY.
|
||||
// DONT FORGET THE COMMA BETWEEN EACH ENTRY, OR THE TICK MARKS AROUND EACH NAME.
|
||||
// WHEN ALL THE IMAGES ARE DONE LOADING, THE "imagesdone" VARIABLE IS SET TO "TRUE"
|
||||
|
||||
var imagenames=new Array( 'images/art.gif' , 'images/art-line.gif' , 'images/contact.gif' , 'images/contact-line.gif' , 'images/filler.gif' , 'images/forums.gif', 'images/home.gif', 'images/info.gif', 'images/info-line.gif', 'images/links.gif', 'images/links-line.gif' , 'images/logo.gif', 'images/news-line.gif', 'images/tile.jpg');
|
||||
|
||||
var yposition=5; //POSITION OF LOAD BAR FROM TOP OF WINDOW, IN PIXELS
|
||||
var loadedcolor='#697E94' ; // PROGRESS BAR COLOR
|
||||
var unloadedcolor='#F5F9FD'; // BGCOLOR OF UNLOADED AREA
|
||||
var barheight=15; // HEIGHT OF PROGRESS BAR IN PIXELS (MIN 25)
|
||||
var barwidth=400; // WIDTH OF THE BAR IN PIXELS
|
||||
var bordercolor='black'; // COLOR OF THE BORDER
|
||||
|
||||
//DO NOT EDIT BEYOND THIS POINT
|
||||
var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
|
||||
var IE4 = (document.all)? true : false;
|
||||
var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
|
||||
var imagesdone=false;
|
||||
var blocksize=barwidth/(imagenames.length);
|
||||
barheight=Math.max(barheight,25);
|
||||
var loaded=0, perouter, perdone, images=new Array();
|
||||
var txt=(NS4)?'<layer name="perouter" bgcolor="'+bordercolor+'" visibility="hide">' : '<div id="perouter" style="position:absolute; visibility:hidden; background-color:'+bordercolor+'">';
|
||||
txt+='<table cellpadding="0" cellspacing="1" border="0"><tr><td width="'+barwidth+'" height="'+barheight+'" valign="center">';
|
||||
if(NS4)txt+='<ilayer width="100%" height="100%"><layer width="100%" height="100%" bgcolor="'+unloadedcolor+'" top="0" left="0">';
|
||||
txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" bgcolor="'+unloadedcolor+'"><center><font color="'+loadedcolor+'" size="1" face="sans-serif">Loading Images...</font></center></td></tr></table>';
|
||||
if(NS4) txt+='</layer>';
|
||||
txt+=(NS4)? '<layer name="perdone" width="100%" height="'+barheight+'" bgcolor="'+loadedcolor+'" top="0" left="0">' : '<div id="perdone" style="position:absolute; top:1px; left:1px; width:'+barwidth+'px; height:'+barheight+'px; background-color:'+loadedcolor+'; z-index:100">';
|
||||
txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" bgcolor="'+loadedcolor+'"><center><font color="'+unloadedcolor+'" size="1" face="sans-serif">Loading Images...</font></center></td></tr></table>';
|
||||
txt+=(NS4)? '</layer></ilayer>' : '</div>';
|
||||
txt+='</td></tr></table>';
|
||||
txt+=(NS4)?'</layer>' : '</div>';
|
||||
document.write(txt);
|
||||
function loadimages(){
|
||||
if(NS4){
|
||||
perouter=document.perouter;
|
||||
perdone=document.perouter.document.layers[0].document.perdone;
|
||||
}
|
||||
if(NS6){
|
||||
perouter=document.getElementById('perouter');
|
||||
perdone=document.getElementById('perdone');
|
||||
}
|
||||
if(IE4){
|
||||
perouter=document.all.perouter;
|
||||
perdone=document.all.perdone;
|
||||
}
|
||||
cliplayer(perdone,0,0,barheight,0);
|
||||
window.onresize=setouterpos;
|
||||
setouterpos();
|
||||
for(n=0;n<imagenames.length;n++){
|
||||
images[n]=new Image();
|
||||
images[n].src=imagenames[n];
|
||||
setTimeout('checkload('+n+')' ,n*100);
|
||||
}}
|
||||
function setouterpos(){
|
||||
var ww=(IE4)? document.body.clientWidth : window.innerWidth;
|
||||
var x=(ww-barwidth)/2;
|
||||
if(NS4){
|
||||
perouter.moveTo(x,yposition);
|
||||
perouter.visibility="show";
|
||||
}
|
||||
if(IE4||NS6){
|
||||
perouter.style.left=x+'px';
|
||||
perouter.style.top=yposition+'px';
|
||||
perouter.style.visibility="visible";
|
||||
}}
|
||||
function dispbars(){
|
||||
loaded++;
|
||||
cliplayer(perdone, 0, blocksize*loaded, barheight, 0);
|
||||
if(loaded>=imagenames.length)setTimeout('hideperouter()', 800);
|
||||
}
|
||||
function checkload(index){
|
||||
(images[index].complete)? dispbars() : setTimeout('checkload('+index+')', 100);
|
||||
}
|
||||
function hideperouter(){
|
||||
(NS4)? perouter.visibility="hide" : perouter.style.visibility="hidden";
|
||||
imagesdone=true;
|
||||
}
|
||||
function cliplayer(layer, ct, cr, cb, cl){
|
||||
if(NS4){
|
||||
layer.clip.left=cl;
|
||||
layer.clip.top=ct;
|
||||
layer.clip.right=cr;
|
||||
layer.clip.bottom=cb;
|
||||
}
|
||||
if(IE4||NS6)layer.style.clip='rect('+ct+' '+cr+' '+cb+' '+cl+')';
|
||||
}
|
||||
window.onload=loadimages;
|
||||
106
content/files/old/sds_v4/scripts/snow.js
Normal file
106
content/files/old/sds_v4/scripts/snow.js
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
/******************************************
|
||||
* Snow Effect Script- By Altan d.o.o. (snow@altan.hr, http://www.altan.hr/snow/index.html)
|
||||
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
|
||||
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
|
||||
******************************************/
|
||||
|
||||
|
||||
//Configure below to change URL path to the snow image
|
||||
var snowsrc="images/snow.gif"
|
||||
// Configure below to change number of snow to render
|
||||
var no = 10;
|
||||
|
||||
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
|
||||
var ie4up = (document.all) ? 1 : 0;
|
||||
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
|
||||
|
||||
var dx, xp, yp; // coordinate and position variables
|
||||
var am, stx, sty; // amplitude and step variables
|
||||
var i, doc_width = 800, doc_height = 600;
|
||||
|
||||
if (ns4up||ns6up) {
|
||||
doc_width = self.innerWidth;
|
||||
doc_height = self.innerHeight;
|
||||
} else if (ie4up) {
|
||||
doc_width = document.body.clientWidth;
|
||||
doc_height = document.body.clientHeight;
|
||||
}
|
||||
|
||||
dx = new Array();
|
||||
xp = new Array();
|
||||
yp = new Array();
|
||||
am = new Array();
|
||||
stx = new Array();
|
||||
sty = new Array();
|
||||
|
||||
for (i = 0; i < no; ++ i) {
|
||||
dx[i] = 0; // set coordinate variables
|
||||
xp[i] = Math.random()*(doc_width-50); // set position variables
|
||||
yp[i] = Math.random()*doc_height;
|
||||
am[i] = Math.random()*20; // set amplitude variables
|
||||
stx[i] = 0.02 + Math.random()/10; // set step variables
|
||||
sty[i] = 0.7 + Math.random(); // set step variables
|
||||
if (ns4up) { // set layers
|
||||
if (i == 0) {
|
||||
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
|
||||
} else {
|
||||
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
|
||||
}
|
||||
} else if (ie4up||ns6up) {
|
||||
if (i == 0) {
|
||||
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
|
||||
} else {
|
||||
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function snowNS() { // Netscape main animation function
|
||||
for (i = 0; i < no; ++ i) { // iterate for every dot
|
||||
yp[i] += sty[i];
|
||||
if (yp[i] > doc_height-50) {
|
||||
xp[i] = Math.random()*(doc_width-am[i]-30);
|
||||
yp[i] = 0;
|
||||
stx[i] = 0.02 + Math.random()/10;
|
||||
sty[i] = 0.7 + Math.random();
|
||||
doc_width = self.innerWidth;
|
||||
doc_height = self.innerHeight;
|
||||
}
|
||||
dx[i] += stx[i];
|
||||
document.layers["dot"+i].top = yp[i];
|
||||
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
|
||||
}
|
||||
setTimeout("snowNS()", 10);
|
||||
}
|
||||
|
||||
function snowIE_NS6() { // IE and NS6 main animation function
|
||||
for (i = 0; i < no; ++ i) { // iterate for every dot
|
||||
yp[i] += sty[i];
|
||||
if (yp[i] > doc_height-50) {
|
||||
xp[i] = Math.random()*(doc_width-am[i]-30);
|
||||
yp[i] = 0;
|
||||
stx[i] = 0.02 + Math.random()/10;
|
||||
sty[i] = 0.7 + Math.random();
|
||||
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
|
||||
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
|
||||
}
|
||||
dx[i] += stx[i];
|
||||
if (ie4up){
|
||||
document.all["dot"+i].style.pixelTop = yp[i];
|
||||
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
|
||||
}
|
||||
else if (ns6up){
|
||||
document.getElementById("dot"+i).style.top=yp[i];
|
||||
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
|
||||
}
|
||||
}
|
||||
setTimeout("snowIE_NS6()", 10);
|
||||
}
|
||||
|
||||
if (ns4up) {
|
||||
snowNS();
|
||||
} else if (ie4up||ns6up) {
|
||||
snowIE_NS6();
|
||||
}
|
||||
|
||||
80
content/files/old/sds_v4/scripts/staticlogo.js
Normal file
80
content/files/old/sds_v4/scripts/staticlogo.js
Normal file
@@ -0,0 +1,80 @@
|
||||
///////////////////////////////////////////////////////////////////
|
||||
/*Site Logo Script (Geocities Watermark)
|
||||
<EFBFBD> Dynamic Drive (www.dynamicdrive.com)
|
||||
For full source code, installation instructions,
|
||||
100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com/ */
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
//edit the below 5 steps
|
||||
|
||||
// 1) substitute 116 and 42 with the width and height of your logo image, respectively
|
||||
var logowidth=100
|
||||
var logoheight=200
|
||||
var logoimage=new Image(logowidth,logoheight)
|
||||
|
||||
// 2) change the image path to reflect the path of your logo image
|
||||
logoimage.src="images/logo.gif"
|
||||
|
||||
// 3) Change url below to the target URL of the logo
|
||||
var logolink="main.html"
|
||||
|
||||
// 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
|
||||
var alttext="Silver Dragon Studios"
|
||||
|
||||
// 5) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you'd like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible.
|
||||
var visibleduration=12
|
||||
|
||||
// Optional parameters
|
||||
var Hoffset=10 //Enter logo's offset from right edge of window (edit only if you don't like the default offset)
|
||||
var Voffset=10 //Enter logo's offset from bottom edge of window (edit only if you don't like the default offset)
|
||||
|
||||
|
||||
///////////////////////////Do not edit below this line/////////////////////////
|
||||
|
||||
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
|
||||
|
||||
var watermark_obj=ie? document.all.watermarklogo : document.getElementById? document.getElementById("watermarklogo") : document.watermarklogo
|
||||
|
||||
function insertimage(){
|
||||
if (ie||document.getElementById)
|
||||
watermark_obj.innerHTML='<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>'
|
||||
else if (document.layers){
|
||||
watermark_obj.document.write('<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>')
|
||||
watermark_obj.document.close()
|
||||
}
|
||||
}
|
||||
|
||||
function positionit(){
|
||||
var dsocleft=ie? document.body.scrollLeft : pageXOffset
|
||||
var dsoctop=ie? document.body.scrollTop : pageYOffset
|
||||
var window_width=ie? document.body.clientWidth : window.innerWidth-20
|
||||
var window_height=ie? document.body.clientHeight : window.innerHeight
|
||||
|
||||
if (ie||document.getElementById){
|
||||
watermark_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-logowidth-Hoffset
|
||||
watermark_obj.style.top=parseInt(dsoctop)+parseInt(window_height)-logoheight-Voffset
|
||||
}
|
||||
else if (document.layers){
|
||||
watermark_obj.left=dsocleft+window_width-Hoffset-logowidth
|
||||
watermark_obj.top=dsoctop+window_height-logoheight-Voffset
|
||||
}
|
||||
}
|
||||
|
||||
function hidewatermark(){
|
||||
if (document.layers)
|
||||
watermark_obj.visibility="hide"
|
||||
else
|
||||
watermark_obj.style.visibility="hidden"
|
||||
clearInterval(watermarkinterval)
|
||||
}
|
||||
|
||||
function beingwatermark(){
|
||||
watermarkinterval=setInterval("positionit()",50)
|
||||
insertimage()
|
||||
if (visibleduration!=0)
|
||||
setTimeout("hidewatermark()",visibleduration*1000)
|
||||
}
|
||||
|
||||
if (ie||document.getElementById||document.layers)
|
||||
window.onload=beingwatermark
|
||||
|
||||
110
content/files/old/sds_v4/scripts/thumbnailviewer.js
Normal file
110
content/files/old/sds_v4/scripts/thumbnailviewer.js
Normal file
@@ -0,0 +1,110 @@
|
||||
|
||||
//Thumbnail image viewer-
|
||||
//<2F> Dynamic Drive (www.dynamicdrive.com)
|
||||
//For full source code, usage terms, and 100's more DHTML scripts, visit http://www.dynamicdrive.com
|
||||
|
||||
var ie=document.all
|
||||
var ns=document.layers
|
||||
var ns6=document.getElementById&&!document.all
|
||||
|
||||
function enlarge(which,e){
|
||||
//Render image code for IE 4+ and NS6
|
||||
if (ie||ns6){
|
||||
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
|
||||
if (crossobj.style.visibility=="hidden"){
|
||||
crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
|
||||
crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
|
||||
crossobj.innerHTML='<div align=right id=drag><b onClick=closepreview()>X</b></div><img src="'+which+'">'
|
||||
crossobj.style.visibility="visible"
|
||||
}
|
||||
else
|
||||
crossobj.style.visibility="hidden"
|
||||
return false
|
||||
}
|
||||
//Render image code for NS 4
|
||||
else if (document.layers){
|
||||
if (document.showimage.visibility=="hide"){
|
||||
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
|
||||
document.showimage.document.close()
|
||||
document.showimage.left=e.x
|
||||
document.showimage.top=e.y
|
||||
document.showimage.visibility="show"
|
||||
}
|
||||
else
|
||||
document.showimage.visibility="hide"
|
||||
return false
|
||||
}
|
||||
//if NOT IE 4+ or NS 4, simply display image in full browser window
|
||||
else
|
||||
return true
|
||||
}
|
||||
|
||||
function closepreview(){
|
||||
crossobj.style.visibility="hidden"
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
|
||||
//By Dynamicdrive.com
|
||||
|
||||
//drag drop function for NS 4////
|
||||
/////////////////////////////////
|
||||
|
||||
var nsx,nsy,nstemp
|
||||
|
||||
function drag_dropns(name){
|
||||
temp=eval(name)
|
||||
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
|
||||
temp.onmousedown=gons
|
||||
temp.onmousemove=dragns
|
||||
temp.onmouseup=stopns
|
||||
}
|
||||
|
||||
function gons(e){
|
||||
temp.captureEvents(Event.MOUSEMOVE)
|
||||
nsx=e.x
|
||||
nsy=e.y
|
||||
}
|
||||
function dragns(e){
|
||||
temp.moveBy(e.x-nsx,e.y-nsy)
|
||||
return false
|
||||
}
|
||||
|
||||
function stopns(){
|
||||
temp.releaseEvents(Event.MOUSEMOVE)
|
||||
}
|
||||
|
||||
//drag drop function for IE 4+ and NS6////
|
||||
/////////////////////////////////
|
||||
|
||||
function drag_drop(e){
|
||||
if (ie&&dragapproved){
|
||||
crossobj.style.left=tempx+event.clientX-offsetx
|
||||
crossobj.style.top=tempy+event.clientY-offsety
|
||||
}
|
||||
else if (ns6&&dragapproved){
|
||||
crossobj.style.left=tempx+e.clientX-offsetx
|
||||
crossobj.style.top=tempy+e.clientY-offsety
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function initializedrag(e){
|
||||
if (ie&&event.srcElement.id=="drag"||ns6&&e.target.id=="drag"){
|
||||
offsetx=ie? event.clientX : e.clientX
|
||||
offsety=ie? event.clientY : e.clientY
|
||||
|
||||
tempx=parseInt(crossobj.style.left)
|
||||
tempy=parseInt(crossobj.style.top)
|
||||
|
||||
dragapproved=true
|
||||
document.onmousemove=drag_drop
|
||||
}
|
||||
}
|
||||
|
||||
document.onmousedown=initializedrag
|
||||
document.onmouseup=new Function("dragapproved=false")
|
||||
|
||||
Reference in New Issue
Block a user