function iecompattest(){	return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body	}function get_cookie(A){	var B=A+"=";var C="";	if(document.cookie.length>0){		offset=document.cookie.indexOf(B);		if(offset!=-1){			offset+=B.length;			end=document.cookie.indexOf(";",offset);			if(end==-1){				end=document.cookie.length				}				C=unescape(document.cookie.substring(offset,end))				}				}				return C}function closebar(){	if(persistclose){		document.cookie="remainclosed=1"		}		document.getElementById(id_name).style.visibility="hidden"}function staticbar(){	barheight=document.getElementById(id_name).offsetHeight;	var ns=(navigator.appName.indexOf("Netscape")!=-1)||window.opera;	var d=document;	function ml(id)	{		var el=d.getElementById(id);		if(!persistclose||persistclose&&get_cookie("remainclosed")==""){			el.style.visibility="visible"			}		if(d.layers){			el.style=el			}	el.sP=function(x,y){		eval("this.style."+ti_alignment+'=x+"px"');		this.style.top=y+"px"		};		el.x=startX;		if(verticalpos=="fromtop"){			el.y=startY			}else{				el.y=ns?pageYOffset+innerHeight:iecompattest().scrollTop+iecompattest().clientHeight;				el.y-=startY}return el}window.stayTopLeft=function()				{					if(verticalpos=="fromtop"){												var pY=ns?pageYOffset:iecompattest().scrollTop;						ftlObj.y+=(pY+startY-ftlObj.y)/8												}else{							var pY=ns?pageYOffset+innerHeight-barheight:iecompattest().scrollTop+iecompattest().clientHeight-barheight;							ftlObj.y+=parseInt((pY-startY-ftlObj.y)/4)}ftlObj.sP(ftlObj.x,ftlObj.y);							setTimeout("stayTopLeft()",200)							};							ftlObj=ml(id_name);														stayTopLeft()							}if(window.addEventListener){								window.addEventListener("load",staticbar,false)								}else{									if(window.attachEvent){										window.attachEvent("onload",staticbar)}else{if(document.getElementById){window.onload=staticbar}}};

function trailOff()
    {
    document.onmousemove='';
    gettrailobj().visibility="hidden";
    }
function gettrailobject()
    {
    if (document.getElementById)
        return document.getElementById("imgtrailer")
    else if (document.all)
        return document.all.trailimagid
    }
function gettrailobj()
    {
    if (document.getElementById)
	{
		return document.getElementById("imgtrailer").style
	}
    else if (document.all)
	{
        return document.all.trailimagid.style
	}
    }
function trailOn(thumbimg,imgtitle,thw,thh,tops)
{
	str = document.location.search;
if (str == "") 
{
//document.write("<p>No coordinates specified.");
}
else 
{
commaloc = str.indexOf(",");
//document.write("<p>The x value is " + str.substring(1, commaloc));
//document.write("<p>The y value is " + str.substring(commaloc+1, str.length));
}
	
	var kids = document.getElementById(tops);
//	alert(kids._Xscale);
//    	if(ua.indexOf('opera') == -1)
//        {
     		var imgsplit = thumbimg.split("file:///");
           	gettrailobj().left="-500px";
			var a;
			
			a = (imgsplit[imgsplit.length-1]);
			var imgsplit2 = a.split("images/");
//			alert(imgsplit2[1]);
//			alert (a.replace('%20',""));
			
			//thumbimg = "img/" + imgsplit[imgsplit.length-1];
			thumbimg = "images/" + imgsplit2[1];
			thumbimg = thumbimg.replace("small","big");
			
			//alert (thumbimg);
//			document.write (thumbimg);
        	divthw = parseInt(thw) + 2;

//        	if(imgsplit[1]!="")
//	        {
				gettrailobject().innerHTML = '<div id="topbars" style="background-color: #6C9BD2; layer-background-color: #6C9BD2; border: 1px none #808080; padding:10px; width:'+divthw+'px;"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px solid #808080;background-image: url(Images/indicator.gif);"><img src="'+thumbimg+'" border="0" width="'+thw+'" height="'+thh+'"></div></div>';

//				gettrailobject().innerHTML = '<div style="background-color: #A2A2A2; layer-background-color: #A2A2A2; border: 1px none #808080; padding:10px; width:'+divthw+'px;"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px solid #808080;background-image: url(Images/indicator.gif);"><img src="img/products/silver/3pcs/Cabochon%203Pcs%20Sets/170x170/Cabochon%203Pcs%20Sets.jpg" border="0" width="'+thw+'" height="'+thh+'"></div></div>';
				
//				//        	}
//        	else
//        	{
//		        gettrailobject().innerHTML = '<div style="background-color: #A2A2A2; layer-background-color: #A2A2A2; border: 1px none #808080; padding:10px; width:'+divthw+'px;"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px solid #808080;background-image: url(Images/indicator.gif);"><img src="../images/noimage.jpg" border="0" width="'+thw+'" height="'+thh+'"></div></div>';
//
//        	}
        	gettrailobj().visibility="visible";
	        divw = parseInt(thw)+25;
        	divh = parseInt(thh)+130;
        	document.onmousemove=followmouse;
      //  }
}
/*

Simple Image Trail script- By JavaScriptKit.com

Visit http://www.javascriptkit.com for this script and more

This notice must stay intact

*/
var ua = navigator.userAgent.toLowerCase();
var divw=0;
var divh=0;
if (document.getElementById || document.all)
    document.write('<div id="imgtrailer" style="position:absolute;visibility:hidden;"></div>')
function gettrailobject()
    {
    if (document.getElementById)
        return document.getElementById("imgtrailer")
    else if (document.all)
        return document.all.trailimagid
    }
function gettrailobj()
    {
    if (document.getElementById)
        return document.getElementById("imgtrailer").style
    else if (document.all)
        return document.all.trailimagid.style
    }
function truebody()
    {
    return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
function trailOff()
    {
    document.onmousemove='';
    gettrailobj().visibility="hidden";
    }
function followmouse(e)
    {
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
    var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, window.innerHeight)
if(typeof e != "undefined")
    {

    if(docwidth < 15+e.pageX+divw)
        xcoord = e.pageX-divw-5;
    else
        xcoord = 15+e.pageX;
    if(docheight < 15+e.pageY+divh)
        ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));
    else
        ycoord = 15+e.pageY;
    }
else if (typeof window.event != "undefined")
    {
		if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)
        	xcoord = truebody().scrollLeft-5+event.clientX-divw;
    	else
        	xcoord = truebody().scrollLeft+15+event.clientX;
    	if(docheight < 15+truebody().scrollTop+event.clientY+divh)
        	ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));
	    else
        	ycoord = truebody().scrollTop+15+event.clientY;
    	}
//		alert (event.clientY);
//	alert (e.pageY);
    gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"
/*	if (typeof e != "undefined"	)
	{
		gettrailobj().top=event.clientY+ycoord+"px";
	}
	else
	{
		gettrailobj().top=event.clientY+300+"px"
	}
*/    }


