
var imageName;
var run=0;
var pageName=0;
var y;
var h1;
var imageName;
var pageName;
var slideShowOn=0;
var oriWidth;
var oriHeight;
var forEnlarge=0;
var GalleryName="Ruben Elliot";
var mImg = new Image();
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=.70)"
var showIndex=0;
var img;
var secu	= new Array();


// begin -->
var isNN = document.layers ? true : false;
var isIE = document.all ? true : false;

//function init() {
  if ( isNN )
    document.captureEvents(Event.MOUSEMOVE)
  document.onmousemove = handleMouseMove;
//}

function handleMouseMove(evt) {

  mouseX = isNN ? evt.pageX : window.event.clientX;
  mouseY = isNN ? evt.pageY : window.event.clientY;
 window.status = "Current Gallery - "+GalleryName;
  return false;
}

// end hide -->
function showGalleryPic(indexID,ind)
{
	//window.status =  "ShowIndex = "+showIndex+" ind = "+ind;
	if (ind<=showIndex){
	document.tName.width =152;
	document.tName.height =100;
	document.getElementById("tempImage").style.left =mouseX+'px';
	document.getElementById("tempImage").style.top =mouseY+25+'px';
	document.getElementById("tempImage").style.visibility = "visible";
	document.tName.src =document.getElementById(indexID).src;
	}
}

function hide()
{
	document.getElementById("tempImage").style.visibility = "hidden";
	document.tName.width =0;
	document.tName.height =0;
	document.getElementById("tempImage").style.top =0+'px';
	document.getElementById("tempImage").style.left =0+'px';
}

function doPic(imgName) {
modifyimage('dynloadarea2', imgName)
}

function doPic1(imgName) {
modifyimage1('dynloadarea1', imgName)
}

    
function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML="<img src="+imgindex+" ,border =4>";
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}

function modifyimage1(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML="<img src="+imgindex+" ,border =4>";
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}

function enlarge(size){
 document.mainpic.width = document.mainpic.width * 1.1
 document.mainpic.height = document.mainpic.height * 1.1;
 doPicE(img);
}

function normal(toDo)
{
	document.mainpic.width = document.mainpic.width/ (1.1)
	document.mainpic.height = document.mainpic.height /(1.1);
	doPicE(img);
}



function showItemX(theForm) { 
  if (slideShowOn==1)
  changeImage(picIndex);
  var optText = "";
  var newQuantity = 1;
  		var  selField = theForm;
    		for (var i=0; i < selField.length; i++) {
      			if (selField[i].selected) {
							//newItem = selField[i].name;
			newItem = imageName+"  "+selField[i].name;
			newPrice = selField[i].value;
			index = document.cookie.indexOf("MyCart");
                        countbegin = (document.cookie.indexOf("=", index) + 1);
                        countend = document.cookie.indexOf(";", index);
                        if (countend == -1) {
                                countend = document.cookie.length;
	          //window.location = "http://homepage.eircom.net/~nithy/basket3.html";
	          window.location = "basket3.html";
                        }
                        document.cookie="MyCart="+document.cookie.substring(countbegin, countend)+"["+newItem+","+newPrice+"^"+newQuantity+"]";
      			}
  			}
}





function closeMe(){
	window.close(0);
}
    




function CreateText()
{
  var validchars = "";
var startvalid = "";
var minsize, maxsize, count, actualsize,outText,inText;
	outText		="";
	minsize		= 6;
	maxsize		= 6;
	startvalid	= "1234567890";
	validchars	= "1234567890";
	
	secu[0]		= "z.jpg";
	secu[1]		= "a.jpg";
	secu[2]		= "b.jpg";
	secu[3]		= "c.jpg";
	secu[4]		= "d.jpg";
	secu[5]		= "e.jpg";
	secu[6]		= "f.jpg";
	secu[7]		= "g.jpg";
	secu[8]		= "h.jpg";
	secu[9]		= "i.jpg";
	secu[10]	= "j.jpg";

	


  actualsize = Math.floor(Math.random() * (maxsize - minsize + 1)) + minsize;
 
  inText = startvalid.charAt(Math.floor(Math.random()* startvalid.length));
  
  for (count = 1; count < actualsize; count++){
   var ind = validchars.charAt(Math.floor(Math.random()* validchars.length));
     outText += ind;     
     document.getElementById(count).src = secu[ind];	
    }
      return (outText);    
}




function right(e) {

if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("www.rubenElliot.com");
return true;
}
return true;

}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
    
