var ImgCounter1=0;
var TotalCount1=0;
var htText1='';

function SetShowcase(Ffile)
{
var temp4='';


//temp4+="<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='500' height='300'>";
temp4+="<OBJECT id='Shockwaveflash1' style='WIDTH: 500px; HEIGHT: 300px; align: center' ";
temp4+="codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' height='204' width='509' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000;'>"; 
temp4+="<PARAM NAME='_cy' VALUE='5398'><param name='movie' value=\""+Ffile+"\" /><PARAM NAME='FlashVars' VALUE=''><PARAM NAME='WMode' VALUE='Window'><PARAM NAME='Play' VALUE='-1'>";
temp4+="<PARAM NAME='Loop' VALUE='-1'><PARAM NAME='Quality' VALUE='High'><PARAM NAME='SAlign' VALUE=''><PARAM NAME='Menu' VALUE='-1'><PARAM NAME='Base' VALUE=''>";
temp4+="<PARAM NAME='AllowScriptAccess' VALUE=''><PARAM NAME='Scale' VALUE='ShowAll'><PARAM NAME='DeviceFont' VALUE='0'><PARAM NAME='EmbedMovie' VALUE='0'>";
temp4+="<PARAM NAME='BGColor' VALUE=''><PARAM NAME='SWRemote' VALUE=''><PARAM NAME='MovieData' VALUE=''><PARAM NAME='SeamlessTabbing' VALUE='1'><PARAM NAME='Profile' VALUE='0'>";
temp4+="<PARAM NAME='ProfileAddress' VALUE=''><PARAM NAME='ProfilePort' VALUE='0'><PARAM NAME='AllowNetworking' VALUE='all'><PARAM NAME='AllowFullScreen' VALUE='false'>";
temp4+="<EMBED SRC=\""+Ffile+"\" quality=\"high\"  pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\"  type=\"application/x-shockwave-flash\"";   
temp4+=" width=\"500px\" height=\"300px\"></EMBED></OBJECT>";
GD("indicus_showcase").innerHTML="";
GD("indicus_showcase").innerHTML=temp4;
}

function SetTitle(FTitle)
{
var showcaseTitle='';
showcaseTitle+='<div style="display:inline-block;height:auto;width:98%;" algin:center><b>'+FTitle+'</b></div>';
GD("GalaryTitle").innerHTML="";
GD("GalaryTitle").innerHTML=showcaseTitle;
}
function SetTag(FTag)
{
var showcaseTag='';
showcaseTag+='<div style="display:inline-block;height:auto;width:98%;" algin:center>'+FTag+'</div>';
GD("GalaryTag").innerHTML="";
GD("GalaryTag").innerHTML=showcaseTag;
}

function rotateSlideImage()
{
try
{
	var xmlItem = GF(xmldoc8,'Item');
	TotalCount1=xmlItem.length;
	htText1='';
	htText1="<div style='height:auto;width:100%;display:inline-block;float:middle;' align='center'><table border='0' width='100%' align='center'><tr>";
	for(i=0;i<4;i++)
	{
	var ind=mod(ImgCounter1+i,TotalCount1);
	var e = xmlItem[ind];
	var ITag = GF(e,'Tag')[0].firstChild.data;
	var ITitle = GF(e,'Title')[0].firstChild.data;
    var IUrl = GF(e,'Url')[0].firstChild.data;
    var ILink = GF(e,'Link')[0].firstChild.data;
    htText1+="<td width='137px' height='80px' valign='middle' align='center'><a  href='javascript:SetTitle(\""+ITitle+"\");SetShowcase(\""+ILink+"\");SetTag(\""+ITag+"\");' id='galarylink'><img align='absBottom' style='padding:1px;border:1px solid gray;'id='galaryimg' src='"+IUrl+"' /></a></td>";
    }
    htText1+="</tr><tr><td colspan='4' width='100%'><div style='width:15%;color:#000099;display:inline-block;float:left;font-size:16px;cursor:pointer;' onclick='return moveSlidePrevious();' align='left'>&lt;&lt;&lt;</div><div class='galaryItem' style='width:15%;margin-right:10px;float:right;color:#000099;display:inline-block;font-size:16px;cursor:pointer;' onclick='return moveSlideNext();' align='right'>&gt;&gt;&gt;</div></td>";
    htText1+="</tr></table></div>";
    GD("IMGAL").innerHTML=htText1;
    
  }
catch(ex5)
{}
if(galary==false)
window.setTimeout("mytimer7();",8000);
galary=false;
return;
}

var galary=false;
function mytimer7()
{
ImgCounter1=mod(ImgCounter1+1,TotalCount1);
rotateSlideImage();
}

function moveSlideNext()
{
galary=true;
ImgCounter1=mod(ImgCounter1+1,TotalCount1);
rotateSlideImage();
}

function moveSlidePrevious()
{
galary=true;
ImgCounter1=mod(ImgCounter1-1,TotalCount1);
rotateSlideImage();
}

var xmldoc8=null;
var ImageCounter1=0;

function getSlideImageData_product(xmldoc) {
try
{
	xmldoc8=xmldoc;
	rotateSlideImage();
	loadSlideImages_product()
}
catch(e)
{
}
}


function loadSlideImages_product()
{
var xmlItem = GF(xmldoc8,'Item');
try
{
var e = xmlItem[ImageCounter1];
var IUrl = GF(e,'Url')[0].firstChild.data;
GD("preImage").src=IUrl;
}
catch(ex)
{}
ImageCounter1++;
if(ImageCounter1<xmlItem.length)
window.setTimeout("loadSlideImages_product();",5000);
}