﻿function yukle(i)
{
yazi.innerHTML=document.getElementById(i).value;
}			

for(i= 0 ; i< imagelist.length ;i++)
{
	if(imagelist[i] == null || imagelist[i] == "")
		break;
	Pic[i] = imagelist[i];
}
p = Pic.length;
for (i = 0; i < p; i++)
{
	preLoad[i] = new Image();
	preLoad[i].src = Pic[i];
}

function runSlideShow()
{
	if(out == false)
	{
		if (document.all)
		{
			document.images.productImage.style.filter="blendTrans(duration=2)";
			document.images.productImage.style.filter="blendTrans(duration=2)";
			document.images.productImage.filters.blendTrans.Apply();
		}
		document.images.productImage.src = preLoad[j].src;
		document.images.productImage.filters.blendTrans.Play();

		j = j + 1;
		if (j > (p-1))
		{
			j=0;
		}
	}
	out=false;
	t = setTimeout('runSlideShow()', slideShowSpeed);
}
function change(id)
{
	var object = document.getElementById('productImage');
	object.style.filter="blendTrans(duration=1)";
	object.style.filter="blendTrans(duration=1)";
	object.filters.blendTrans.Apply();
	var imagedest = preLoad[parseInt(id) - 1].src;
	object.src =  imagedest;
	document.images.productImage.filters.blendTrans.Play();
	out = true;
	return false;
}

function openPicture(c)
{
	var i = c.lastIndexOf("/") ;
	if (document.getElementById('cProductImage').value.indexOf('actionImage') < 0)
	{
		document.getElementById('cProductImage').value += '&actionImage=' + c.substring(i + 1 , c.length ) ;
	}
	abc.setSelectedPage('tabImage');
}

var HideFlag;
function displayLayer()
{
	HideFlag=false;
	var ly = document.getElementById("divExpl");
	ly.style.display='block' ;
	document.getElementById("divExpl").style.position="absolute" ;
	document.getElementById("divExpl").style.left = 10 ;
	document.getElementById("divExpl").style.top = 130 ;

}

function donotDisplayLayer()
{
	HideFlag = true;
	setTimeout('HideExpLayer()',500);
}

function HideExpLayer()
{
	if (HideFlag == true)
	{
		var ly = document.getElementById("divExpl");
		ly.style.display='none' ;
		document.getElementById("divExpl").style.position="absolute" ;
		HideFlag=false;
	}
}
