var DefaultDate;

function GetFlashDate(ElementName, callFunction)
{
var strurl;
var tmpvalue;

tmpvalue = eval("document." + ElementName + ".value");
strurl = 'Include/Calendar.aspx?date=' + tmpvalue;

var TheDate = "";

TheDate = showModalDialog(strurl, 0, "dialogWidth:240px;dialogHeight:270px;status:no;edge:raised;scroll:no;help:no;unadorned:yes");

if (TheDate != "")
{

eval("document." + ElementName + ".value = '" + TheDate + "'");
DefaultDate = TheDate;

if (callFunction)
eval(callFunction);

}
return;
}

function GetFlashDateFromRoot(ElementName, strRoot, callFunction)
{
var strurl;
var tmpvalue;

tmpvalue = eval("document." + ElementName + ".value");
strurl = strRoot + '/Include/Calendar.aspx?date=' + tmpvalue;

var TheDate = "";

TheDate = showModalDialog(strurl, 0, "dialogWidth:240px;dialogHeight:270px;status:no;edge:raised;scroll:no;help:no;unadorned:yes");

if (TheDate != "")
{

eval("document." + ElementName + ".value = '" + TheDate + "'");
DefaultDate = TheDate;

if (callFunction)
eval(callFunction);;

}
return;
}


function GetFlashDateWithURL(ElementName,strUrl, callFunction)
{
var strurl;
var tmpvalue;

tmpvalue = eval("document." + ElementName + ".value");
strurl = strUrl + '?date=' + tmpvalue;

var TheDate = "";

TheDate = showModalDialog(strurl, 0, "dialogWidth:240px;dialogHeight:270px;status:no;edge:raised;scroll:no;help:no;unadorned:yes");

if (TheDate != "")
{

eval("document." + ElementName + ".value = '" + TheDate + "'");
DefaultDate = TheDate;

if (callFunction)
eval(callFunction);

}
return;
}
//added by tracey on 10th Jan 2008
function GetFlashDateDiffDefaultAndPopulateField(ElementNameDefault, ElementNamePopulate, callFunction)
{
var strurl;
var tmpvalue;

tmpvalue = eval("document." + ElementNameDefault + ".value");
strurl = 'Include/Calendar.aspx?date=' + tmpvalue;

var TheDate = "";

TheDate = showModalDialog(strurl, 0, "dialogWidth:240px;dialogHeight:270px;status:no;edge:raised;scroll:no;help:no;unadorned:yes");

if (TheDate != "")
{

eval("document." + ElementNamePopulate + ".value = '" + TheDate + "'");
DefaultDate = TheDate;

if (callFunction)
eval(callFunction);;

}
return;
}

