var imagesText = new Array(21);
imagesText[0] = "Text for image 0 <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[1] = "Text for image 1 <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[2] = "Text for image 2 <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[3] = "City, Country July 5, 2007 <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[4] = "City, Country July 5, 2007 <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[5] = "this is image 5 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[6] = "this is image 6 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[7] = "this is image 7 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[8] = "this is image 8 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[9] = "this is image 9 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[10] = "this is image 10 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[11] = "this is image 11 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[12] = "this is image 12 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[13] = "this is image 13 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[14] = "this is image 14 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[15] = "this is image 15 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[16] = "this is image 16 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[17] = "this is image 17 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[18] = "this is image 18 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[19] = "this is image 19 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
imagesText[20] = "this is image 20 and its description <a href='#' style='color:#00A1D4;' onclick='onLogoClick();'>See more...</a>";
var counter = 0;
var NumOfImages=10;
function onLogoClick()
{
    //post(68);
    return false;
}
function OnArrow(ev)
{
    if(counter  >= NumOfImages)
        counter = 0;
    if(counter  < 0)
        counter = NumOfImages-1;
    
    showImage(counter, true);
    CancelEvent(ev);
    return false;
}
function CancelEvent(ev)
{
    try
    { 
        if (typeof ev.stopPropagation != 'undefined') /*FireFox, GoogleChrome*/
        {
            ev.stopPropagation();
        }
        if (typeof ev.cancelBubble != 'undefined') /*IE, FireFox, GoogleChrome*/
        {
            ev.cancelBubble = true;
        }
    }
    catch(e)
    {
    }
    return false;
}
//change the opacity for different browsers 
function changeOpac(opacity, id) 
{ 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
}
var objTimer = null;
function showImage(imgNum, bAnimate)
{
    try
    {
        //document.getElementById('divHeader').className = "SIME-HearderImage" +  imgNum;
        if(bAnimate == true)
        {
            document.getElementById('divHeaderParent').style.backgroundImage = document.getElementById('divHeader').style.backgroundImage;
            changeOpac(0, 'divHeader');
        }
        
        var ImageFolderPath = document.getElementById('imagesPath').value + 'Header' + imgNum + ".gif";
        //alert(ImageFolderPath);
        document.getElementById('divHeader').style.backgroundImage = "url('" + ImageFolderPath +"')";
        
        //document.getElementById('divInfo').innerHTML = imagesText[imgNum];
        
        if(bAnimate == true)
        {
            if(objTimer != null)
            {
                clearTimeout(objTimer);
                objTimer = null;
            }
            
            var timer = 0; 
            for(i = 0; i <= 100; i+=10) 
            { 
                objTimer = setTimeout("changeOpac(" + i + ",'divHeader')",(timer * 70)); 
                timer++; 
            } 
        }
        
    }
    catch(e)
    {
        alert(e);
    }
}
function preLoadImages()
{
    try
    {
        if(document.images)
        {
          var preload_image = new Array ();
          for(var i=0; i<NumOfImages; i++)
          {
            preload_image[i]= new Image();
            
            var ImageFolderPath = document.getElementById('imagesPath').value + 'Header' + i + ".gif";
            
            preload_image[i].src = ImageFolderPath;
          }
        }
   
    }
    catch(e)
    {
        alert(e.description);
    }
}
