function delay(gap){ /* gap is in millisecs */ //alert(delay); var then,now; then=new Date().getTime(); now=then; while((now-then)= 4)); // Global variable declaration var gKMinTime = 10000 ; var BottomCounter = 0; var gBottomIterationCounter = 1; var TopLeftCounter = 0; var gTopLeftIterationCounter =1; var TopRightCounter = 0; var gTopRightIterationCounter =1; var HomeLeft1Counter = 0; var gHomeLeft1IterationCounter =1; var HomeLeft2Counter = 0; var gHomeLeft2IterationCounter =1; var HomeRight1Counter = 0; var gHomeRight1IterationCounter =1; var HomeRight2Counter = 0; var gHomeRight2IterationCounter =1; var StoryRight1Counter = 0; var gStoryRight1IterationCounter =1; var StoryRight2Counter = 0; var gStoryRight2IterationCounter =1; var StoryRight3Counter = 0; var gStoryRight3IterationCounter =1; var DebugString = "" //Function to trim leading and trailing spaces from a string function trimString (str) { while (str.charAt(0) == ' ') str = str.substring(1); while (str.charAt(str.length - 1) == ' ') str = str.substring(0, str.length - 1); return str; } //--------------EOF-----trimString()---------------------- //Function to Launch the URL for the Banners function LaunchURLForBanner(BannerPath, PathList, URLList){ // Get Banner paths in an array //BannerPathList = document.forms[0].BottomBannerPathList.value arrayOfBannerPaths = PathList.split(",") // Get Banner URL's in an array //BannerURLList = document.forms[0].BottomBannerURLList.value arrayOfBannerURLs = URLList.split(",") //Process all banner paths from an array to compare specified banner path for (var i = 0; i < arrayOfBannerPaths.length; i++) { // alert(arrayOfBannerPaths[i].toUpperCase() + "###" + BannerPath.toUpperCase()) if (trimString (BannerPath.toUpperCase()).indexOf(trimString (arrayOfBannerPaths[i].toUpperCase())) >= 0 ) { //alert("Path Matched") Url = arrayOfBannerURLs[i] newWindow=window.open(Url ,"",""); newWindow.focus(); return true } } } //--------------------------EOF- LaunchURLForBottomBanner() ------------------------ /*USED FOR BANNER ROTATION */ //Load Bottom Banner at the bottom //Returns the element at the index position function GetValueAtIndex(stringToSplit,separator,index) { arrayOfStrings = stringToSplit.split(separator) return arrayOfStrings[index] } // Function to trim the leading spaces function ltrim(str) { oldstr = str len = oldstr.length newstr ="" if(oldstr.indexOf(" ")==0) { var i = 0 var done = 0 while(i" //------Display the image //if (document.TopImage != null && TopLeftDocId != null) // document.TopImage.src ="/" + DBPath + "/" + ltrim(TopLeftDocId) + "/$FILE/" + ltrim(TopLeftImageName) //------Display the images (FLASH & JPG support) if (document.TopImage != null && TopLeftDocId != null) { if( trimString(TopLeftImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { if ( document.all( "ImgIDTopLeftFlash" ).style.visibility == "hidden" ) { document.all( "ImgIDTopLeftFlash" ).style.visibility = "visible" document.all( "ImgIDTopLeft" ).style.visibility = "hidden" document.all( "ImgIDTopLeft" ).style.position = "absolute" document.all( "ImgIDTopLeft" ).style.top = "2%" document.all( "ImgIDTopLeft" ).style.left = "15%" } document.TopImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(TopLeftDocId) + "/$FILE/" + ltrim(TopLeftImageName)); document.TopImage.src ="blank.jpg" } else { if ( document.all( "ImgIDTopLeft" ).style.visibility == "hidden" ) { document.all("ImgIDTopLeft").style.visibility = "visible" document.all( "ImgIDTopLeftFlash" ).style.visibility = "hidden" document.all( "ImgIDTopLeftFlash" ).style.position = "absolute" document.all( "ImgIDTopLeftFlash" ).style.top = "2%" document.all( "ImgIDTopLeftFlash" ).style.left = "15%" } document.TopImage.src ="/" + DBPath + "/" + ltrim(TopLeftDocId) + "/$FILE/" + ltrim(TopLeftImageName) document.TopImageFlash.LoadMovie(0, "http://" + document.forms[0].HTTP_HOST.value +"/blank.swf"); } } //------Change Iteration counter, TopLeftCounter if( gTopLeftIterationCounter == DisplayImageCounter ){ gTopLeftIterationCounter = 1; if( TopLeftCounter == KMaxTopLeftBanners ) { TopLeftCounter = 0; } else { TopLeftCounter++; } } else gTopLeftIterationCounter++ } /*------------------------End of function DisplayTopLeftBanners()--------------------------*/ /*-------------------Function to display TOP Right banners ------------------*/ function DisplayTopRightBanners() { //------- Number of Images KMaxTopRightBanners =document.forms[0].TopRightTotalImages.value - 1; //------- Number of iterations for this image: TopRightImagesRunTime = document.forms[0].TopRightImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(TopRightImagesRunTime, KMaxTopRightBanners) DisplayImageCounter = GetValueAtIndex(CounterString,",",TopRightCounter) //------Get DocIds for Bottom Images TopRightdocIds = document.forms[0].TopRightDocIds.value TopRightDocId = GetValueAtIndex(TopRightdocIds,",",TopRightCounter) if (TopRightDocId != null) TopRightDocId = TopRightDocId.replace(" ", ""); //------- List of images TopRightImageNames = document.forms[0].TopRightImageNames.value //------- Image name for the current iteration TopRightImageName = GetValueAtIndex(TopRightImageNames,",",TopRightCounter) if (TopRightImageName != null) TopRightImageName = TopRightImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "TopRightCounter = " + TopRightCounter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gTopRightIterationCounter + " Current Image = " + TopRightImageName); DebugString = DebugString + "# TopRightCounter = " + TopRightCounter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gTopRightIterationCounter + " Current Image = " + TopRightImageName + "
" //------Display the images (FLASH & JPG support) if (document.TopRightImage != null && TopRightDocId != null) { if( trimString(TopRightImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { if ( document.all( "ImgIDTopRightFlash" ).style.visibility == "hidden" ) { document.all( "ImgIDTopRightFlash" ).style.visibility = "visible" document.all( "ImgIDTopRight" ).style.visibility = "hidden" document.all( "ImgIDTopRight" ).style.position = "absolute" document.all( "ImgIDTopRight" ).style.left = "25%" } document.TopRightImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(TopRightDocId) + "/$FILE/" + ltrim(TopRightImageName)); document.TopRightImage.src ="blank.jpg" } else { if ( document.all( "ImgIDTopRight" ).style.visibility == "hidden" ) { document.all['ImgIDTopRight'].style.visibility = "visible" document.all( "ImgIDTopRightFlash" ).style.visibility = "hidden" document.all( "ImgIDTopRightFlash" ).style.position = "absolute" document.all( "ImgIDTopRightFlash" ).style.left = "25%" } document.TopRightImage.src ="/" + DBPath + "/" + ltrim(TopRightDocId) + "/$FILE/" + ltrim(TopRightImageName) document.TopRightImageFlash.LoadMovie(0, "http://" + document.forms[0].HTTP_HOST.value +"/blank.swf"); } } //------Change Iteration counter, TopRightCounter if( gTopRightIterationCounter == DisplayImageCounter ){ gTopRightIterationCounter = 1; if( TopRightCounter == KMaxTopRightBanners ) { TopRightCounter = 0; } else { TopRightCounter++; } } else gTopRightIterationCounter++ } /*------------------------End of function DisplayTopRightBanners()--------------------------*/ /*-------------------Function to display Bottom banners ------------------*/ function DisplayBottomBanners() { //------- Number of Images KMaxBottomBanners =document.forms[0].BottomTotalImages.value - 1; //------- Number of iterations for this image: BottomImagesRunTime = document.forms[0].BottomImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(BottomImagesRunTime, KMaxBottomBanners) DisplayImageCounter = GetValueAtIndex(CounterString,",",BottomCounter) //------Get DocIds for Bottom Images bottomdocIds = document.forms[0].BottomDocIds.value BottomDocId = GetValueAtIndex(bottomdocIds,",",BottomCounter) if (BottomDocId != null) BottomDocId = BottomDocId.replace(" ", ""); //------- List of images BottomImageNames = document.forms[0].BottomImageNames.value //------- Image name for the current iteration BottomImageName = GetValueAtIndex(BottomImageNames,",",BottomCounter) if (BottomImageName != null) BottomImageName = BottomImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "BottomCounter = " + BottomCounter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gBottomIterationCounter + " Current Image = " + BottomImageName); DebugString = DebugString + "# BottomCounter = " + BottomCounter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gBottomIterationCounter + " Current Image = " + BottomImageName + "
" //------Display the image if (document.BottomImage != null && BottomDocId != null) document.BottomImage.src ="/" + DBPath + "/" + ltrim(BottomDocId) + "/$FILE/" + ltrim(BottomImageName) /* //------Display the images (FLASH & JPG support) if (document.BottomImage != null && BottomDocId != null) { if( trimString(BottomImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { if ( document.all( "ImgIDBottomFlash" ).style.visibility == "hidden" ) { document.all( "ImgIDBottomFlash" ).style.visibility = "visible" document.all( "ImgIDBottom" ).style.visibility = "hidden" } document.BottomImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(BottomDocId) + "/$FILE/" + ltrim(BottomImageName)); document.BottomImage.src ="blank.jpg" } else { if ( document.all( "ImgIDBottom" ).style.visibility == "hidden" ) { document.all['ImgIDBottom'].style.visibility = "visible" document.all( "ImgIDBottomFlash" ).style.visibility = "hidden" } document.BottomImage.src ="/" + DBPath + "/" + ltrim(BottomDocId) + "/$FILE/" + ltrim(BottomImageName) document.BottomImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, BottomCounter if( gBottomIterationCounter == DisplayImageCounter ){ gBottomIterationCounter = 1; if( BottomCounter == KMaxBottomBanners ) { BottomCounter = 0; } else { BottomCounter++; } } else gBottomIterationCounter++ } /*------------------------End of function DisplayBottomBanners()--------------------------*/ /*-------------------Function to display HomeLeft1 banners ------------------*/ function DisplayHomeLeft1Banners() { //------- Number of Images KMaxHomeLeft1Banners =document.forms[0].HomeLeft1TotalImages.value - 1; //------- Number of iterations for this image: HomeLeft1ImagesRunTime = document.forms[0].HomeLeft1ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(HomeLeft1ImagesRunTime, KMaxHomeLeft1Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",HomeLeft1Counter) //------Get DocIds for HomeLeft1 Images HomeLeft1docIds = document.forms[0].HomeLeft1DocIds.value HomeLeft1DocId = GetValueAtIndex(HomeLeft1docIds,",",HomeLeft1Counter) if (HomeLeft1DocId != null) HomeLeft1DocId = HomeLeft1DocId.replace(" ", ""); //------- List of images HomeLeft1ImageNames = document.forms[0].HomeLeft1ImageNames.value //------- Image name for the current iteration HomeLeft1ImageName = GetValueAtIndex(HomeLeft1ImageNames,",",HomeLeft1Counter) if (HomeLeft1ImageName != null) HomeLeft1ImageName = HomeLeft1ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "HomeLeft1Counter = " + HomeLeft1Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gHomeLeft1IterationCounter + " Current Image = " + HomeLeft1ImageName); DebugString = DebugString + "# HomeLeft1Counter = " + HomeLeft1Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gHomeLeft1IterationCounter + " Current Image = " + HomeLeft1ImageName + "
" //------Display the image if (document.HomeLeft1Image != null && HomeLeft1DocId != null) document.HomeLeft1Image.src ="/" + DBPath + "/" + ltrim(HomeLeft1DocId) + "/$FILE/" + ltrim(HomeLeft1ImageName) /* //------Display the images (FLASH & JPG support) if (document.HomeLeft1Image != null && HomeLeft1DocId != null) { if( trimString(HomeLeft1ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { if ( document.all( "ImgIDHomeLeft1Flash" ).style.visibility == "hidden" ) { document.all( "ImgIDHomeLeft1Flash" ).style.visibility = "visible" document.all( "ImgIDHomeLeft1Flash" ).style.position = "relative" document.all( "ImgIDHomeLeft1" ).style.visibility = "hidden" //document.all( "ImgIDHomeLeft1" ).style.position = "absolute" } document.HomeLeft1ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(HomeLeft1DocId) + "/$FILE/" + ltrim(HomeLeft1ImageName)); document.HomeLeft1Image.src ="blank.jpg" } else { if ( document.all( "ImgIDHomeLeft1" ).style.visibility == "hidden" ) { document.all['ImgIDHomeLeft1'].style.visibility = "visible" document.all( "ImgIDHomeLeft1Flash" ).style.visibility = "hidden" document.all( "ImgIDHomeLeft1Flash" ).style.position = "absolute" document.all( "ImgIDHomeLeft1" ).style.position = "relative" } document.HomeLeft1Image.src ="/" + DBPath + "/" + ltrim(HomeLeft1DocId) + "/$FILE/" + ltrim(HomeLeft1ImageName) document.HomeLeft1ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, HomeLeft1Counter if( gHomeLeft1IterationCounter == DisplayImageCounter ){ gHomeLeft1IterationCounter = 1; if( HomeLeft1Counter == KMaxHomeLeft1Banners ) { HomeLeft1Counter = 0; } else { HomeLeft1Counter++; } } else gHomeLeft1IterationCounter++ } /*------------------------End of function DisplayHomeLeft1Banners()--------------------------*/ /*-------------------Function to display HomeLeft2 banners ------------------*/ function DisplayHomeLeft2Banners() { //------- Number of Images KMaxHomeLeft2Banners =document.forms[0].HomeLeft2TotalImages.value - 1; //------- Number of iterations for this image: HomeLeft2ImagesRunTime = document.forms[0].HomeLeft2ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(HomeLeft2ImagesRunTime, KMaxHomeLeft2Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",HomeLeft2Counter) //------Get DocIds for HomeLeft2 Images HomeLeft2docIds = document.forms[0].HomeLeft2DocIds.value HomeLeft2DocId = GetValueAtIndex(HomeLeft2docIds,",",HomeLeft2Counter) if (HomeLeft2DocId != null) HomeLeft2DocId = HomeLeft2DocId.replace(" ", ""); //------- List of images HomeLeft2ImageNames = document.forms[0].HomeLeft2ImageNames.value //------- Image name for the current iteration HomeLeft2ImageName = GetValueAtIndex(HomeLeft2ImageNames,",",HomeLeft2Counter) if (HomeLeft2ImageName != null) HomeLeft2ImageName = HomeLeft2ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "HomeLeft2Counter = " + HomeLeft2Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gHomeLeft2IterationCounter + " Current Image = " + HomeLeft2ImageName); DebugString = DebugString + "#HomeLeft2Counter = " + HomeLeft2Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gHomeLeft2IterationCounter + " Current Image = " + HomeLeft2ImageName + "
" //------Display the image if (document.HomeLeft2Image != null && HomeLeft2DocId != null) document.HomeLeft2Image.src ="/" + DBPath + "/" + ltrim(HomeLeft2DocId) + "/$FILE/" + ltrim(HomeLeft2ImageName) /* //------Display the images (FLASH & JPG support) if (document.HomeLeft2Image != null && HomeLeft2DocId != null) { if( trimString(HomeLeft2ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { if ( document.all( "ImgIDHomeLeft2Flash" ).style.visibility == "hidden" ) { document.all( "ImgIDHomeLeft2Flash" ).style.visibility = "visible" document.all( "ImgIDHomeLeft2Flash" ).style.position = "relative" document.all( "ImgIDHomeLeft2" ).style.visibility = "hidden" //document.all( "ImgIDHomeLeft2" ).style.position = "absolute" } document.HomeLeft2ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(HomeLeft2DocId) + "/$FILE/" + ltrim(HomeLeft2ImageName)); document.HomeLeft2Image.src ="blank.jpg" } else { if ( document.all( "ImgIDHomeLeft2" ).style.visibility == "hidden" ) { document.all['ImgIDHomeLeft2'].style.visibility = "visible" document.all( "ImgIDHomeLeft2Flash" ).style.visibility = "hidden" document.all( "ImgIDHomeLeft2Flash" ).style.position = "absolute" document.all( "ImgIDHomeLeft2" ).style.position = "relative" } document.HomeLeft2Image.src ="/" + DBPath + "/" + ltrim(HomeLeft2DocId) + "/$FILE/" + ltrim(HomeLeft2ImageName) document.HomeLeft2ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, HomeLeft2Counter if( gHomeLeft2IterationCounter == DisplayImageCounter ){ gHomeLeft2IterationCounter = 1; if( HomeLeft2Counter == KMaxHomeLeft2Banners ) { HomeLeft2Counter = 0; } else { HomeLeft2Counter++; } } else gHomeLeft2IterationCounter++ } /*------------------------End of function DisplayHomeLeft2Banners()--------------------------*/ /*-------------------Function to display HomeRight1 banners ------------------*/ function DisplayHomeRight1Banners() { //------- Number of Images KMaxHomeRight1Banners =document.forms[0].HomeRight1TotalImages.value - 1; //------- Number of iterations for this image: HomeRight1ImagesRunTime = document.forms[0].HomeRight1ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(HomeRight1ImagesRunTime, KMaxHomeRight1Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",HomeRight1Counter) //------Get DocIds for HomeRight1 Images HomeRight1docIds = document.forms[0].HomeRight1DocIds.value HomeRight1DocId = GetValueAtIndex(HomeRight1docIds,",",HomeRight1Counter) if (HomeRight1DocId != null) HomeRight1DocId = HomeRight1DocId.replace(" ", ""); //------- List of images HomeRight1ImageNames = document.forms[0].HomeRight1ImageNames.value //------- Image name for the current iteration HomeRight1ImageName = GetValueAtIndex(HomeRight1ImageNames,",",HomeRight1Counter) if (HomeRight1ImageName != null) HomeRight1ImageName = HomeRight1ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "HomeRight1Counter = " + HomeRight1Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gHomeRight1IterationCounter + " Current Image = " + HomeRight1ImageName); DebugString = DebugString + "#HomeRight1Counter = " + HomeRight1Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gHomeRight1IterationCounter + " Current Image = " + HomeRight1ImageName + "
" //------Display the image if (document.HomeRight1Image != null && HomeRight1DocId != null) document.HomeRight1Image.src ="/" + DBPath + "/" + ltrim(HomeRight1DocId) + "/$FILE/" + ltrim(HomeRight1ImageName) /* //------Display the images (FLASH & JPG support) if (document.HomeRight1Image != null && HomeRight1DocId != null) { if( trimString(HomeRight1ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { document.HomeRight1ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(HomeRight1DocId) + "/$FILE/" + ltrim(HomeRight1ImageName)); document.HomeRight1Image.src ="blank.jpg" } else { document.HomeRight1Image.src ="/" + DBPath + "/" + ltrim(HomeRight1DocId) + "/$FILE/" + ltrim(HomeRight1ImageName) document.HomeRight1ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, HomeRight1Counter if( gHomeRight1IterationCounter == DisplayImageCounter ){ gHomeRight1IterationCounter = 1; if( HomeRight1Counter == KMaxHomeRight1Banners ) { HomeRight1Counter = 0; } else { HomeRight1Counter++; } } else gHomeRight1IterationCounter++ } /*------------------------End of function DisplayHomeRight1Banners()--------------------------*/ /*-------------------Function to display HomeRight2 banners ------------------*/ function DisplayHomeRight2Banners() { //------- Number of Images KMaxHomeRight2Banners =document.forms[0].HomeRight2TotalImages.value - 1; //------- Number of iterations for this image: HomeRight2ImagesRunTime = document.forms[0].HomeRight2ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(HomeRight2ImagesRunTime, KMaxHomeRight2Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",HomeRight2Counter) //------Get DocIds for HomeRight2 Images HomeRight2docIds = document.forms[0].HomeRight2DocIds.value HomeRight2DocId = GetValueAtIndex(HomeRight2docIds,",",HomeRight2Counter) if (HomeRight2DocId != null) HomeRight2DocId = HomeRight2DocId.replace(" ", ""); //------- List of images HomeRight2ImageNames = document.forms[0].HomeRight2ImageNames.value //------- Image name for the current iteration HomeRight2ImageName = GetValueAtIndex(HomeRight2ImageNames,",",HomeRight2Counter) if (HomeRight2ImageName != null) HomeRight2ImageName = HomeRight2ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "HomeRight2Counter = " + HomeRight2Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gHomeRight2IterationCounter + " Current Image = " + HomeRight2ImageName); DebugString = DebugString + "#HomeRight2Counter = " + HomeRight2Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gHomeRight2IterationCounter + " Current Image = " + HomeRight2ImageName + "
" //------Display the image if (document.HomeRight2Image != null && HomeRight2DocId != null) document.HomeRight2Image.src ="/" + DBPath + "/" + ltrim(HomeRight2DocId) + "/$FILE/" + ltrim(HomeRight2ImageName) /* //------Display the images (FLASH & JPG support) if (document.HomeRight2Image != null && HomeRight2DocId != null) { if( trimString(HomeRight2ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { document.HomeRight2ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(HomeRight2DocId) + "/$FILE/" + ltrim(HomeRight2ImageName)); document.HomeRight2Image.src ="blank.jpg" } else { document.HomeRight2Image.src ="/" + DBPath + "/" + ltrim(HomeRight2DocId) + "/$FILE/" + ltrim(HomeRight2ImageName) document.HomeRight2ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, HomeRight2Counter if( gHomeRight2IterationCounter == DisplayImageCounter ){ gHomeRight2IterationCounter = 1; if( HomeRight2Counter == KMaxHomeRight2Banners ) { HomeRight2Counter = 0; } else { HomeRight2Counter++; } } else gHomeRight2IterationCounter++ } /*------------------------End of function DisplayHomeRight2Banners()--------------------------*/ /*-------------------Function to display story form Right1 banners ------------------*/ function DisplayStoryRight1Banners() { //------- Number of Images KMaxStoryRight1Banners =document.forms[0].RightTotalImages.value - 1; //------- Number of iterations for this image: StoryRight1ImagesRunTime = document.forms[0].RightImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(StoryRight1ImagesRunTime, KMaxStoryRight1Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",StoryRight1Counter) //------Get DocIds for StoryRight1 Images StoryRight1docIds = document.forms[0].RightDocIds.value StoryRight1DocId = GetValueAtIndex(StoryRight1docIds,",",StoryRight1Counter) if (StoryRight1DocId != null) StoryRight1DocId = StoryRight1DocId.replace(" ", ""); //------- List of images StoryRight1ImageNames = document.forms[0].RightImageNames.value //------- Image name for the current iteration StoryRight1ImageName = GetValueAtIndex(StoryRight1ImageNames,",",StoryRight1Counter) if (StoryRight1ImageName != null) StoryRight1ImageName = StoryRight1ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "StoryRight1Counter = " + StoryRight1Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gStoryRight1IterationCounter + " Current Image = " + StoryRight1ImageName); DebugString = DebugString + "#StoryRight1Counter = " + StoryRight1Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gStoryRight1IterationCounter + " Current Image = " + StoryRight1ImageName + "
" //------Display the image if (document.RightImage != null && StoryRight1DocId != null) document.RightImage.src ="/" + DBPath + "/" + ltrim(StoryRight1DocId) + "/$FILE/" + ltrim(StoryRight1ImageName) /* //------Display the images (FLASH & JPG support) if (document.RightImage != null && StoryRight1DocId != null) { if( trimString(StoryRight1ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { document.RightImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(StoryRight1DocId) + "/$FILE/" + ltrim(StoryRight1ImageName)); document.RightImage.src ="blank.jpg" } else { document.RightImage.src ="/" + DBPath + "/" + ltrim(StoryRight1DocId) + "/$FILE/" + ltrim(StoryRight1ImageName) document.RightImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, StoryRight1Counter if( gStoryRight1IterationCounter == DisplayImageCounter ){ gStoryRight1IterationCounter = 1; if( StoryRight1Counter == KMaxStoryRight1Banners ) { StoryRight1Counter = 0; } else { StoryRight1Counter++; } } else gStoryRight1IterationCounter++ } /*------------------------End of function DisplayStoryRight1Banners()--------------------------*/ /*-------------------Function to display story form Right2 banners ------------------*/ function DisplayStoryRight2Banners() { //------- Number of Images KMaxStoryRight2Banners =document.forms[0].Right2TotalImages.value - 1; //------- Number of iterations for this image: StoryRight2ImagesRunTime = document.forms[0].Right2ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(StoryRight2ImagesRunTime, KMaxStoryRight2Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",StoryRight2Counter) //------Get DocIds for StoryRight2 Images StoryRight2docIds = document.forms[0].Right2DocIds.value StoryRight2DocId = GetValueAtIndex(StoryRight2docIds,",",StoryRight2Counter) if (StoryRight2DocId != null) StoryRight2DocId = StoryRight2DocId.replace(" ", ""); //------- List of images StoryRight2ImageNames = document.forms[0].Right2ImageNames.value //------- Image name for the current iteration StoryRight2ImageName = GetValueAtIndex(StoryRight2ImageNames,",",StoryRight2Counter) if (StoryRight2ImageName != null) StoryRight2ImageName = StoryRight2ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "StoryRight2Counter = " + StoryRight2Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gStoryRight2IterationCounter + " Current Image = " + StoryRight2ImageName); DebugString = DebugString + "#StoryRight2Counter = " + StoryRight2Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gStoryRight2IterationCounter + " Current Image = " + StoryRight2ImageName + "
" //------Display the image if (document.Right2Image != null && StoryRight2DocId != null) document.Right2Image.src ="/" + DBPath + "/" + ltrim(StoryRight2DocId) + "/$FILE/" + ltrim(StoryRight2ImageName) /* //------Display the images (FLASH & JPG support) if (document.Right2Image != null && StoryRight2DocId != null) { if( trimString(StoryRight2ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { document.Right2ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(StoryRight2DocId) + "/$FILE/" + ltrim(StoryRight2ImageName)); document.Right2Image.src ="blank.jpg" } else { document.Right2Image.src ="/" + DBPath + "/" + ltrim(StoryRight2DocId) + "/$FILE/" + ltrim(StoryRight2ImageName) document.Right2ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, StoryRight2Counter if( gStoryRight2IterationCounter == DisplayImageCounter ){ gStoryRight2IterationCounter = 1; if( StoryRight2Counter == KMaxStoryRight2Banners ) { StoryRight2Counter = 0; } else { StoryRight2Counter++; } } else gStoryRight2IterationCounter++ } /*------------------------End of function DisplayStoryRight2Banners()--------------------------*/ /*-------------------Function to display story form Right3 banners ------------------*/ function DisplayStoryRight3Banners() { //------- Number of Images KMaxStoryRight3Banners =document.forms[0].Right3TotalImages.value - 1; //------- Number of iterations for this image: StoryRight3ImagesRunTime = document.forms[0].Right3ImagesRunTime.value //------Create a counter string to store the number of of iterations for image CounterString = CreateCounterString(StoryRight3ImagesRunTime, KMaxStoryRight3Banners) DisplayImageCounter = GetValueAtIndex(CounterString,",",StoryRight3Counter) //------Get DocIds for StoryRight3 Images StoryRight3docIds = document.forms[0].Right3DocIds.value StoryRight3DocId = GetValueAtIndex(StoryRight3docIds,",",StoryRight3Counter) if (StoryRight3DocId != null) StoryRight3DocId = StoryRight3DocId.replace(" ", ""); //------- List of images StoryRight3ImageNames = document.forms[0].Right3ImageNames.value //------- Image name for the current iteration StoryRight3ImageName = GetValueAtIndex(StoryRight3ImageNames,",",StoryRight3Counter) if (StoryRight3ImageName != null) StoryRight3ImageName = StoryRight3ImageName.replace(" ", ""); //------- Database path for image URL DBPath = document.forms[0].DBPath.value //alert( "StoryRight3Counter = " + StoryRight3Counter + " Number of iterations = " + DisplayImageCounter); //alert("CurrentIteration = " + gStoryRight3IterationCounter + " Current Image = " + StoryRight3ImageName); DebugString = DebugString + "#StoryRight3Counter = " + StoryRight3Counter + " Number of iterations = " + DisplayImageCounter + " CurrentIteration = " + gStoryRight3IterationCounter + " Current Image = " + StoryRight3ImageName + "
" //------Display the image if (document.Right3Image != null && StoryRight3DocId != null) document.Right3Image.src ="/" + DBPath + "/" + ltrim(StoryRight3DocId) + "/$FILE/" + ltrim(StoryRight3ImageName) /* //------Display the images (FLASH & JPG support) if (document.Right3Image != null && StoryRight3DocId != null) { if( trimString(StoryRight3ImageName.toUpperCase()).indexOf(".SWF") >= 0 ) { document.Right3ImageFlash.LoadMovie(0, "/" + DBPath + "/" + ltrim(StoryRight3DocId) + "/$FILE/" + ltrim(StoryRight3ImageName)); document.Right3Image.src ="blank.jpg" } else { document.Right3Image.src ="/" + DBPath + "/" + ltrim(StoryRight3DocId) + "/$FILE/" + ltrim(StoryRight3ImageName) document.Right3ImageFlash.LoadMovie(0, "/blank.swf"); } } */ //------Change Iteration counter, StoryRight3Counter if( gStoryRight3IterationCounter == DisplayImageCounter ){ gStoryRight3IterationCounter = 1; if( StoryRight3Counter == KMaxStoryRight3Banners ) { StoryRight3Counter = 0; } else { StoryRight3Counter++; } } else gStoryRight3IterationCounter++ } /*------------------------End of function DisplayStoryRight3Banners()--------------------------*/ /*-------------Function to Display banners of TOP frame --------------*/ function DisplayTopBanners(RandomBannerNo, TopRightRandomBannerNo) { //alert(RandomBannerNo) //alert(TopRightRandomBannerNo) //-------Display TOPLEFT Banners if(document.forms[0].TotalImages.value != null) { if(document.forms[0].TotalImages.value > 0) { TopLeftCounter = RandomBannerNo DisplayTopLeftBanners(); } } //-------Display TOPRIGHT Banners if(document.forms[0].TopRightTotalImages.value != null) { if(document.forms[0].TopRightTotalImages.value > 0) { TopRightCounter = TopRightRandomBannerNo DisplayTopRightBanners(); } } //-----Call DisplayTopBanners() function after min. time interval ID=window.setTimeout("DisplayTopBanners(TopLeftCounter,TopRightCounter);", gKMinTime); //prompt("Details of Banners:", DebugString) } /*--------------End of DisplayTopBanners()----------------------*/ /*-------------Function to Display banners of Story form --------------*/ function DisplayStoryBanners(RndBannerNoRight1,RndBannerNoRight2,RndBannerNoRight3,RndBottomBannerNo) { //-------Display Story Right1 Banners if(document.forms[0].RightTotalImages.value != null) { if(document.forms[0].RightTotalImages.value > 1) { StoryRight1Counter = RndBannerNoRight1 DisplayStoryRight1Banners(); } } //-------Display Story Right2 Banners if(document.forms[0].Right2TotalImages.value != null) { if(document.forms[0].Right2TotalImages.value > 1) { StoryRight2Counter = RndBannerNoRight2 DisplayStoryRight2Banners(); } } //-------Display Story Right3 Banners if(document.forms[0].Right3TotalImages.value != null) { if(document.forms[0].Right3TotalImages.value > 1) { StoryRight3Counter = RndBannerNoRight3 DisplayStoryRight3Banners(); } } //--------Display BOTTOM banners if(document.forms[0].BottomTotalImages.value != null) { if(document.forms[0].BottomTotalImages.value > 1) { BottomCounter = RndBottomBannerNo DisplayBottomBanners(); } } //-----Call DisplayRightFrameBanners() function after min. time interval ID=window.setTimeout("DisplayStoryBanners(StoryRight1Counter,StoryRight2Counter,StoryRight3Counter,BottomCounter);", gKMinTime); //prompt("Details of Banners:", DebugString) } /*--------------End Function to Display banners of Story form ---------------------*/ /*-------------Function to Display banners of Right frame --------------*/ function DisplayRightFrameBanners(RndBottom,RndHomeLeft1,RndHomeLeft2,RndHomeRight1,RndHomeRight2) { //alert("Bottom" + RndBottom) //alert("Left1" + RndHomeLeft1) //alert("Left2" + RndHomeLeft2) //alert("Right1" + RndHomeRight1) //alert("Right2" + RndHomeRight2) //--------Display BOTTOM banners if(document.forms[0].BottomTotalImages.value != null ) { if(document.forms[0].BottomTotalImages.value > 1) { BottomCounter = RndBottom DisplayBottomBanners(); } } //-------Display HOMELEFT1 banners if(document.forms[0].HomeLeft1TotalImages.value != null ) { if(document.forms[0].HomeLeft1TotalImages.value > 1) { HomeLeft1Counter = RndHomeLeft1; DisplayHomeLeft1Banners(); } } //-------Display HOMELEFT2 banners //alert("HomeLeft2 Total Images :" + document.forms[0].HomeLeft2TotalImages.value) if(document.forms[0].HomeLeft2TotalImages.value != null) { if(document.forms[0].HomeLeft2TotalImages.value > 1) { HomeLeft2Counter = RndHomeLeft2; DisplayHomeLeft2Banners(); } } //-------Display HOMERIGHT1 banners if(document.forms[0].HomeRight1TotalImages.value != null ) { if( document.forms[0].HomeRight1TotalImages.value > 1) { HomeRight1Counter = RndHomeRight1; DisplayHomeRight1Banners(); } } //-------Display HOMERIGHT2 banners if(document.forms[0].HomeRight2TotalImages.value != null) { if(document.forms[0].HomeRight2TotalImages.value > 1) { HomeRight2Counter = RndHomeRight2; DisplayHomeRight2Banners(); } } //-----Call DisplayRightFrameBanners() function after min. time interval ID=window.setTimeout("DisplayRightFrameBanners(BottomCounter,HomeLeft1Counter,HomeLeft2Counter,HomeRight1Counter,HomeRight2Counter);", gKMinTime); //prompt("Details of Banners:", DebugString) } /*-------------------END - function DisplayRightFrameBanners()------------------------*/