﻿// JScript File
// remove search text on focus
function removeText(txt)
{
document.getElementById(txt).value = "";
}
// add search text on focus
function addText(txt, value)
{
if(document.getElementById(txt).value === "")
{
document.getElementById(txt).value = value;
}
}

function hideCal(hideDiv)
{
document.getElementById(hideDiv).style.position = "absolute";
document.getElementById(hideDiv).style.zIndex = "-1";
document.getElementById(hideDiv).style.visibility = "hidden";
}

function showCal(showDiv, top, left)
{
document.getElementById(showDiv).style.position = "absolute";
document.getElementById(showDiv).style.zIndex = "100";
document.getElementById(showDiv).style.top = top;
document.getElementById(showDiv).style.left = left;
document.getElementById(showDiv).style.width = "220";
document.getElementById(showDiv).style.visibility = "visible";
}

// show popup
function Show(ctrl) {
    document.getElementById(ctrl).style.display = "block";
    return false;
}

// hide popup
function Hide(ctrl) {

    document.getElementById(ctrl).style.display = "none";
}


// get ctontrol start and end positions
function getXY(ctrl)
{
var div = document.getElementById(ctrl);
alert(div.pageY);
}

// slide show
function slideShow(title)
{
//var div = document.getElementsByTagName("div");
//var slides = new Array();
//var slideId = 0;
//for (int i = 0; i < div.length; i++)
//{
//    if(div[i].getAttribute("title") == title)
//    {
//        slides[slideId] = "ExclusiveOffer" + (slideId + 1);
//        alert(slides[slideId]);
//        slideId++;
//    }
//}
alert(document.getElementsByTagName("div").length);
}
