
 /* Description : Silver light  SlideShow Values 
    Created By  : Anitha P 
    Created On  : May 30 , 2008
 */
    
     
var count=0;
function cycletheimages()
{  
     GetImagesPath();
 }
       
 function GetImagesPath()
 {
         try
         {
          // var categoryname=document.getElementById("HiddenField1"); 
         BI_WebRef.BusinessInformation(0,OnSuccesImage,OnFailImage);
         //BI_WebRef.GetSilverSlideshow(HiddenField1,OnSuccesImage,OnFailImage);
         }
         
         catch (err)
         {
           alert("Error");
         }
    
 }
    var ImagesURL=null; 
    var a=0;
     function OnSuccesImage(result, userContext, methodName)
     { 
         ImagesURL= result.split(",");
         ShowImage(a);
         
     }
var string="";
function ShowImage(a)
{

     var wpfe =document.getElementById("GeoPhoto1Wpfe"); 
      
     var photoImage = wpfe.content.FindName("photoImage");
     photoImage.Source=ImagesURL[a];

     var photoFadeOut = wpfe.content.FindName("photoFadeOut");
     photoFadeOut.Begin();

     var photoFadeIn = wpfe.content.FindName("photoFadeIn");
     photoFadeIn.Begin();
 
     if(a<ImagesURL.length-1)
     {
         a++;
         string = "ShowImage("+a+")";
         t=setTimeout(string,5000);
     }
     else
     {
         a=0;
         ShowImage(a);
     
     }
}
function OnFailImage(error, userContext, methodName) 
{
   // alert("Failed to show SlideShow");
}
/*************************************************************************************************************************/
///*
//     * Module:      Silverlight slide show for Article Page
//     * Created By:  Shipra Maheshwari
//     * Created On:  11 June 20008
//     
// */
//         var imgcount=0;
//         var imgpath=null;
//         var tempvalue=0;
//         var stringvalue="";
//         function ImageRotation()
//         {         
//           GetImageUrl();
//         }
//         function GetImageUrl()
//         {
//            try
//             {
//               
//                BI_WebRef.GetSilverSlideshow(0,OnSuccesSlideShow,OnFailSlideShow);
//             }
//             
//             catch (err)
//             {
//               alert("Error");
//              }
//         }
//         function OnSuccesSlideShow(img_result, userContext, methodName)
//         {
//          imgpath=img_result.split(",");
//          DisplayImage(tempvalue);
//         }
//         function DisplayImage(tempvalue)
//         {
//         
//             if(tempvalue<ImagesURL.length-1)
//             {
//              tempvalue++;
//              stringvalue = "DisplayImage("+tempvalue+")";
//              t=setTimeout(string,5000);
//             }
//             else
//             {
//             a=0;
//             DisplayImage(tempvalue);
//                         
//             }
//         }
//         function OnFailSlideShow(error, userContext, methodName) 
//         {
//      
//         }