", "");
rawData = rawData.replace("\";\", "");
return rawData;
}
var alertHolder = null;
var alertTitle = null;
var alertMessage = null;
var alertCloseID = null;
var alertIsOpen = false;
function showAlert(title, message, icon, width, height, closeDelay) {
if (alertHolder == null) {
alertHolder = document.getElementById("dvAlertHolder");
alertTitle = document.getElementById("dvAlertTitle");
alertMessage = document.getElementById("dvAlertMessage");
Event.add(window, "resize", function (e) { alertHolder.style.display = "none"; });
}
if (icon != null) {
alertTitle.style.background = "url(" + icon + ") no-repeat 2px 2px";
}
else {
alertTitle.style.background = "none";
}
alertTitle.innerHTML = title + " ";
alertMessage.innerHTML = message;
clearTimeout(alertCloseID);
if (alertIsOpen == true) {
resizeObject(alertHolder, 0, 0, "l", "t", 10, 10, null, null, "fs", function () { resizeObject(alertHolder, width, height, "l", "t", 10, 10, null, null, "fs", null); clearTimeout(alertCloseID); alertCloseID = setTimeout("closeAlert()", closeDelay); });
return;
}
alertIsOpen = true;
alertHolder.style.height = "0px";
alertHolder.style.width = "0px";
setAlertPostion();
alertHolder.style.display = "block";
resizeObject(alertHolder, width, height, "l", "t", 10, 10, null, null, "fs", null);
alertCloseID = setTimeout("closeAlert()", closeDelay);
}
function closeAlert() {
resizeObject(alertHolder, 0, 0, "l", "t", 10, 10, null, null, "fs", function () { alertHolder.style.display = "none"; });
alertIsOpen = false;
}
function setAlertPostion() {
//if(alertHolder==null) return;
var e = window, a = 'inner';
if (!('innerWidth' in window)) {
a = 'client';
e = document.documentElement || document.body;
}
var bWidth = e[a + 'Width'];
var bHeight = e[a + 'Height'];
alertHolder.style.top = (bHeight - 5) + "px";
alertHolder.style.left = (bWidth - 5) + "px";
}
function showGotoTop(e, onThisDocument) {
if (onThisDocument == true) {
Event.add(window, "scroll", function (e) { showGotoTop(e); });
Event.add(window, "resize", function (e) { showGotoTop(e); });
return;
}
/*var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;*/
var curScrollPos = document.documentElement.scrollTop || document.body.scrollTop;
var gtHolder = document.getElementById("gotoTopHolder");
var gT = document.getElementById("gotoTop");
var dHeight = (document.body.offsetHeight - document.documentElement.clientHeight) - 37;
var tPos = document.documentElement.clientHeight - 25;
//if (gtHolder.style.display != "none")
{
if (curScrollPos >= dHeight) tPos = tPos - (curScrollPos - dHeight);
gtHolder.style.top = tPos + "px";
gtHolder.style.left = ((document.documentElement.clientWidth / 2) - 37) + "px";
}
if (curScrollPos == 0) {
if (!document.all) {
fadeOut(gtHolder, 20, null, function () { gtHolder.style.display = "none"; });
}
else {
gtHolder.style.display = "none";
}
return;
}
if (gtHolder.style.display == "none") {
tPos = document.documentElement.clientHeight - 25;
if (curScrollPos >= dHeight) tPos = tPos - (curScrollPos - dHeight);
gtHolder.style.top = tPos + "px";
gtHolder.style.left = ((document.documentElement.clientWidth / 2) - 37) + "px";
//gtHolder.style.position = "absolute";
if (!document.all) setOpacity(gtHolder, 0);
gtHolder.style.display = "block";
//function() { bounceObject(gtHolder, "d", 40, fadeIn, null); }
//moveObject(gtHolder, null, tPos, 10, 200, null, null, "sf", false, function() { bounceObject(gtHolder, "d", 25, fadeIn, null); });
if (!document.all) fadeIn(gtHolder, 40, null, null);
}
}
function timePickerAttach(toObj, container, displayPos) {
if (typeof (container) != "object") {
container = document.getElementById(container);
}
container.toObj = toObj;
Event.add(toObj, "focus", function (e) { timePickerShow(e, toObj, container, displayPos); });
Event.add(container, "click", function (e) { timePickerListner(e, toObj, container); });
Event.add(document, "mousedown", function (e) { timePickerHide(e, container, "document"); });
timePickerCreate(container);
toObj.selHour = "12";
toObj.selMinute = "00";
toObj.selMer = "AM";
}
function timePickerCreate(container) {
if (typeof (container) != "object") {
container = document.getElementById(container);
}
//container.style.display = "none";
if (container.className != "TimePickerHolder ShadowBottom") {
container.className = "TimePickerHolder ShadowBottom";
container.innerHTML = document.getElementById("TimePickerTemplate").innerHTML;
}
}
function timePickerShow(e, toObj, container, displayPos) {
var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;
if (typeof (container) != "object") {
container = document.getElementById(container);
}
if (document.all) isIE = 1;
if (checkTime(toObj.value) == true) {
toObj.selHour = toObj.value.substring(0, 2);
toObj.selMinute = toObj.value.substring(3, 5);
toObj.selMer = toObj.value.substring(6, 8);
container.childNodes[1 - isIE].innerHTML = toObj.selHour + ":" + toObj.selMinute + " " + toObj.selMer;
}
else {
toObj.selHour = "12";
toObj.selMinute = "00";
toObj.selMer = "AM";
container.childNodes[1 - isIE].innerHTML = toObj.selHour + ":" + toObj.selMinute + " " + toObj.selMer;
}
container.style.left = findObjPosX(toObj) + "px";
container.style.top = (findObjPosY(toObj) + toObj.offsetHeight) + "px";
setOpacity(container, 100);
container.style.height = "1px";
resizeObject(container, null, 210, "r", "b", 20, 7, null, 20, "fs", null);
container.style.display = "block";
}
function timePickerHide(e, container, sender) {
var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;
if (typeof (container) != "object") {
container = document.getElementById(container);
}
if (sender == "document") {
if (isParent(targ, container.id, false) == false && targ.id != container.toObj.id) {
fadeOut(container, 20, null, function () { container.style.display = "none"; });
}
return;
}
fadeOut(container, 20, null, function () { container.style.display = "none"; });
}
function timePickerListner(e, toObj, container) {
var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;
if (typeof (container) != "object") {
container = document.getElementById(container);
}
var infoHolder = toObj;
if (document.all) isIE = 1;
if (evt.type == "click") {
if (targ.getAttribute("command") != null) {
if (targ.getAttribute("command") == "close") {
fadeOut(container, 20, null, function () { container.style.display = "none"; });
}
if (targ.getAttribute("command") == "set") {
container.toObj.value = container.childNodes[1 - isIE].innerHTML;
fadeOut(container, 20, null, function () { container.style.display = "none"; });
}
return;
}
var tChanged = false;
if (targ.getAttribute("selHour") != null) {
infoHolder.selHour = targ.getAttribute("selHour");
tChanged = true;
}
if (targ.getAttribute("selMinute") != null) {
infoHolder.selMinute = targ.getAttribute("selMinute");
tChanged = true;
}
if (targ.getAttribute("selMer") != null) {
infoHolder.selMer = targ.getAttribute("selMer");
tChanged = true;
}
if (tChanged == true) {
container.childNodes[1 - isIE].style.display = "none";
container.childNodes[1 - isIE].innerHTML = infoHolder.selHour + ":" + infoHolder.selMinute + " " + infoHolder.selMer;
container.childNodes[1 - isIE].style.display = "block";
}
}
}
var menuAlreadyAttached = false;
function attachMouseListener() {
if (menuAlreadyAttached == false) {
Event.add(document, "mousemove", function (e) { masterMouseHandler(e); });
Event.add(document, "mouseup", function (e) { masterMouseHandler(e); });
menuAlreadyAttached = true;
}
}
function getLinkedMenu(callerName) {
if (callerName == "LeftMenuCorporate") {
return "MenuPopCorporate";
}
else if (callerName == "LeftMenuEvent") {
return "MenuPopEvent";
}
else if (callerName == "LeftMenuHR") {
return "MenuPopHR";
}
else {
return null;
}
}
var alreadyPopped = "";
var movedWidget = null;
var movedArPos;
var curWidgetMovedPos;
var curTargetWidget;
function masterMouseHandler(e)
{
var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;
targID = targ.id;
if (evt.type == "mouseup")
{
if (widgetIsDragging == true)
{
widgetIsDragging = false;
showWidgetWait();
curTargetWidget = lastWidgetFocus;
lastWidgetFocus = null;
//widgetControls.style.display = "none";
var moveTo;
if (curWidgetMovedPos >= arWidgetLocationTop.length) {
moveTo = findObjPosY(movedWidget) - widgetDragHeight;
}
else {
moveTo = (arWidgetLocationTop[curWidgetMovedPos] * 1) + widgetHolderTop;
}
moveObject(widgetControls, null, moveTo - 23, 10, 15, null, null, "fs", false, null);
moveObject(curTargetWidget, null, moveTo, 10, 15, null, null, "fs", false, function () { widgetReorder(); });
suppressDefault(evt);
document.body.setAttribute("style", "");
return false;
}
}
if (evt.type == "mousemove")
{
if (widgetIsDragging == true)
{
var addSpace = 0;
var mPY = getMouseY(evt);
if (mPY > widgetHolderTop - 20 && mPY < (widgetHolderBottom - widgetDragHeight) + (widgetDragHeight / 2) + 20) {
widgetControls.style.top = (mPY - 8) + "px";
lastWidgetFocus.style.top = (mPY + 16) + "px";
var curWidgetPos = mPY - widgetHolderTop;
var wNext;
for (gP = 0; gP < arWidgetLocationTop.length; gP++) {
if (gP >= curWidgetMovedPos) addSpace = ((widgetDragHeight * 1));
if (curWidgetPos >= (arWidgetLocationTop[gP] * 1) + addSpace && curWidgetPos <= (arWidgetLocationBottom[gP] * 1) + addSpace + 25) {
wNext = gP;
if (curWidgetPos > ((arWidgetLocationTop[gP] * 1) + addSpace) + ((arWidgetModHeight[gP] * 1) / 2)) {
wNext = gP + 1;
}
else {
wNext = gP;
}
break;
}
}
if (wNext == undefined) return;
if (wNext == curWidgetMovedPos) return;
curWidgetMovedPos = wNext;
var nextWidget = document.getElementById("wsep_" + wNext);
if (curWidgetMovedPos > dragWidgetPos) {
nextWidget = document.getElementById("wsep_" + (curWidgetMovedPos + 1));
}
if (nextWidget == null) nextWidget = widgetContainer.lastChild;
if (movedWidget != null && nextWidget != movedWidget) {
clearInterval(movedWidget.moveID);
if (document.all) {
moveObject(movedWidget, null, 0, 3, 3, null, null, "fs", true, null);
}
else {
moveObject(movedWidget, null, 0, 7, 7, null, null, "fs", true, null);
}
}
movedWidget = nextWidget;
//nextWidget.style.border = "solid 3px";
if (document.all) {
moveObject(nextWidget, null, ((widgetDragHeight * 1) + 25), 3, 3, null, null, "fs", true, null);
}
else {
moveObject(nextWidget, null, ((widgetDragHeight * 1) + 25), 7, 7, null, null, "fs", true, null);
}
suppressDefault(evt);
return false;
}
return false;
}
if (lastWidgetFocus != null)
{
if (isParent(targ, "widgetControlsHolder", false) == false && targ != lastWidgetFocus)
{
hideWidgetControls(lastWidgetFocus);
}
}
if (alreadyPopped != "" && targID != alreadyPopped)
{
if (targ.className.substring(0, 7) != "MenuPop")
{
closeLeftPop(alreadyPopped, getLinkedMenu(alreadyPopped));
}
}
if (targID != alreadyPopped && targID.substring(0, 8) == "LeftMenu")
{
alreadyPopped = targID;
openLeftPop(targID, getLinkedMenu(targID));
}
}
}
var overPopMenu = false;
var curCaller = null;
function openLeftPop(callerID, showMenu) {
var objCaller = document.getElementById(callerID);
overPopMenu = false;
curCaller = objCaller;
objCaller.className = "LeftMenuItem MenuMore_hover";
var curMenu = document.getElementById(showMenu);
if (curMenu == null) return;
var ieAdd = 0;
if (document.all) {
ieAdd = 1;
}
curMenu.style.left = ((findObjPosX(objCaller) * 1) + 184 - ieAdd) + "px";
curMenu.style.top = ((findObjPosY(objCaller) * 1)) + "px";
curMenu.style.display = "block";
//clearInterval(curMenu.fadeID);
//startFadeIn(curMenu, 30);
}
function closeLeftPop(openID, closeMenu) {
if (alreadyPopped == "" || closeMenu == null) {
return;
}
var curMenu = document.getElementById(closeMenu);
if (curMenu == null) return;
curMenu.style.display = "none";
//curMenu.fadeVal = 0;
//setOpacity(curMenu, curMenu.fadeVal);
document.getElementById(openID).className = "LeftMenuItem MenuMore";
alreadyPopped = "";
}
var zoomID;
var isIE = 0;
function showLoginBox(dialogTitle) {
if (dialogTitle != undefined) {
document.getElementById("loginBoxHeader").innerHTML = dialogTitle;
}
theForm.ctl00_loginUser_UserName.value = "";
theForm.ctl00_loginUser_Password.value = "";
document.getElementById("ctl00_loginUser_upFailure").innerHTML = ""
if (document.all) {
isIE = 1;
}
{
var boxObj = document.getElementById("ctl00_pnlDialogLogin");
zOp = 0;
setOpacity(boxObj.childNodes[1 - isIE], zOp);
boxObj.style.width = "0px";
}
//boxObj.style.height = "50px";
startRes = 0;
$find('modalLogin').show();
clearInterval(zoomID);
//zoomID = setInterval("zoomBox('ctl00_pnlDialogLogin',350,183)", 20);
if (document.all) isIE = 1;
resizeObject(document.getElementById("ctl00_pnlDialogLogin"), 350, null, "c", "c", 20 - (isIE * 10), 10 - (isIE * 5), null, null, "sf", function () { fadeIn(boxObj.childNodes[1 - isIE], 20, null, null); });
}
function showLoginBoxWithReturn(dialogTitle, returunurl) {
theForm.req.value = returunurl;
if (dialogTitle != undefined) {
document.getElementById("loginBoxHeader").innerHTML = dialogTitle;
}
theForm.ctl00_loginUser_UserName.value = "";
theForm.ctl00_loginUser_Password.value = "";
document.getElementById("ctl00_loginUser_upFailure").innerHTML = ""
if (document.all) {
isIE = 1;
}
var boxObj = document.getElementById("ctl00_pnlDialogLogin");
zOp = 0;
setOpacity(boxObj.childNodes[1 - isIE], zOp);
boxObj.style.width = "0px";
//boxObj.style.height = "50px";
startRes = 0;
$find('modalLogin').show();
clearInterval(zoomID);
//zoomID = setInterval("zoomBox('ctl00_pnlDialogLogin',350,183)", 20);
if (document.all) isIE = 1;
resizeObject(document.getElementById("ctl00_pnlDialogLogin"), 350, null, "c", "c", 20 - (isIE * 10), 10 - (isIE * 5), null, null, "sf", function () { fadeIn(boxObj.childNodes[1 - isIE], 20, null, null); });
}
var sectionBox = null;
var delayHighlight = null;
function sectionLinkHover(forLink, boxWidth, boxLeft) {
if (sectionBox == null) {
sectionBox = document.getElementById("ctl00_sectionMenuSel");
//sectionBox.style.width = sectionBox.getAttribute("curSectionWidth")+"px";
//sectionBox.style.marginLeft = "0px";
//sectionBox.style.left = (findObjPosX(document.getElementById(sectionBox.getAttribute("curSection"))) - 5) + "px";
if (headerMouseEvent == false) Event.add(document.documentElement, "mousemove", function (e) { headerMouseHandler(e, false); });
headerMouseEvent = true;
Event.add(window, "resize", function (e) { headerMouseHandler(e, true); });
}
moveObject(sectionBox, boxLeft, null, 15, 10, null, null, "fs", true, null);
resizeObject(sectionBox, boxWidth, null, "r", null, 20, 10, null, null, "fs", null);
movedHightlight = true;
}
var curSection = null;
var curSectionWidth = 40;
var curSectionLeft = 355;
var headerMouseEvent = false;
var movedHightlight = false;
function headerMouseHandler(e, force) {
if (e != null) {
var evt = e || window.event;
var targ;
var targID;
if (evt.target) targ = evt.target;
else if (evt.srcElement) targ = evt.srcElement;
}
if (sectionBox == null) {
sectionBox = document.getElementById("ctl00_sectionMenuSel");
//sectionBox.style.width = sectionBox.getAttribute("curSectionWidth")+"px";
//sectionBox.style.marginLeft = "0px";
//sectionBox.style.left = (findObjPosX(curSection) - 5) + "px";
if (headerMouseEvent == false) Event.add(document.documentElement, "mousemove", function (e) { headerMouseHandler(e, false); });
headerMouseEvent = true;
Event.add(window, "resize", function (e) { headerMouseHandler(e, true); });
}
if (curSection == null) {
curSection = document.getElementById(sectionBox.getAttribute("curSection"));
curSectionWidth = sectionBox.getAttribute("curSectionWidth") * 1;
curSectionLeft = sectionBox.getAttribute("curSectionLeft") * 1;
}
if ((movedHightlight == true && !isParent(targ, "sectionMenuHolder", false) || force == true)) {
moveObject(sectionBox, curSectionLeft, null, 15, 10, null, null, "fs", true, null);
resizeObject(sectionBox, curSectionWidth, null, "r", null, 20, 10, null, null, "fs", null);
movedHightlight = false;
}
if (showingSearch == true) {
if (!isParent(targ, "userBarHolder", false) && searchFocus == false) {
hideMainSearch();
}
}
}
var searchHolder = null;
var showingSearch = false;
var searchFocus = false;
function showMainSearch() {
return;
if (searchHolder == null) {
searchHolder = document.getElementById("userSearchHolder");
if (headerMouseEvent == false) Event.add(document.documentElement, "mousemove", function (e) { headerMouseHandler(e, false); });
if (headerMouseEvent == false) Event.add(document.getElementById("userBarHolder"), "mouseout", function (e) { headerMouseHandler(e, false); });
//if (headerMouseEvent == false) Event.add(theForm.txtSiteSearch, "keypress", function (e) { });
headerMouseEvent = true;
sectionBox = document.getElementById("ctl00_sectionMenuSel");
//sectionBox.style.marginLeft = "0px";
//sectionBox.style.left = (findObjPosX(document.getElementById(sectionBox.getAttribute("curSection"))) - 5) + "px";
}
searchHolder.style.display = "block";
if (theForm.txtSiteSearch.value != "" && theForm.txtSiteSearch.value != "Search site...") {
theForm.txtSiteSearch.style.color = "#000000";
theForm.txtSiteSearch.style.fontStyle = "normal";
}
resizeObject(searchHolder, 125, null, "l", null, 10, 10, null, null, "fs", function () { document.getElementById("lnkSiteSearch").href = "javascript:doSiteSearch(null,true);"; });
showingSearch = true;
}
function hideMainSearch() {
if (searchHolder == null) {
searchHolder = document.getElementById("userSearchHolder");
}
resizeObject(searchHolder, 0, null, "l", null, 10, 10, null, null, "fs", function () { searchHolder.style.display = "none"; document.getElementById("lnkSiteSearch").href = "#"; });
showingSearch = false;
}
function doSiteSearch(e, force) {
if (e != null) {
var evt = e || window.event;
var key = evt.keyCode || evt.which;
}
if (force == true || evt.keyCode == 13) {
var strSearch = theForm.txtSiteSearch.value;
location.href = "Search.aspx?query=" + strSearch;
suppressDefault(evt);
return false;
}
}
var widgetControls = null;
var lastWidgetFocus = null;
var arWidgetsHeights = new Array();
var arWidgetIDs = new Array();
var widgetHolderTop = null;
var widgetContainer;
var heightsHolder = null;
function getWidgetContainer()
{
if (widgetContainer == null) widgetContainer = document.getElementById("ctl00_MainContent_lblUserWidgets");
}
function widgetGetHeights()
{
getWidgetContainer();
if (widgetContainer == null) return;
if (heightsHolder == null) heightsHolder = document.getElementById("ctl00_MainContent_lblDum").innerHTML;
if (widgetHolderTop == null) widgetHolderTop = findObjPosY(widgetContainer);
if (arWidgetsHeights.length == 0) {
arWidgetsHeights = heightsHolder.split("♠");
arWidgetIDs = document.getElementById("ctl00_MainContent_lblWidgetIDs").innerHTML.split("♠");
}
}
function showWidgetControls(widget) {
attachMouseListener();
if (widgetIsDragging == true) return;
widgetGetHeights();
if (customizingWidget != null) return;
if (widgetControls == null) {
widgetControls = document.getElementById("widgetControlsHolder");
}
if (lastWidgetFocus != null) {
hideWidgetControls(lastWidgetFocus);
}
lastWidgetFocus = widget;
widget.className = "WidgetFocus";
//setOpacity(widgetControls, 75);
var widgetTop;
var widgetLeft;
var widgetWidth;
var widgetHeight;
widgetTop = findObjPosY(widget);
widgetLeft = findObjPosX(widget);
widgetWidth = widget.offsetWidth;
widgetHeight = widget.offsetHeight;
if (document.all) {
widgetControls.style.left = (widgetLeft) + "px";
widgetControls.style.top = (widgetTop - 22) + "px";
}
else {
widgetControls.style.left = (widgetLeft) + "px";
widgetControls.style.top = (widgetTop - 23) + "px";
}
widgetControls.style.display = "block";
}
function hideWidgetControls(widget)
{
if (widgetIsDragging == true) return;
if (widget == null)
{
widgetControls.style.display = "none";
return;
}
lastWidgetFocus = null;
widget.className = "IFrameWidgetSettings";
if (widgetControls == null) {
widgetControls = document.getElementById("widgetControlsHolder");
}
widgetControls.style.display = "none";
}
function reloadWidget(widget) {
widget.reloading = true;
var curWidgetCover = document.getElementById("widgetCover_" + widget.getAttribute("widgetKey"));
curWidgetCover.className = "WidgetCover";
curWidgetCover.style.height = widget.offsetHeight + "px";
curWidgetCover.style.width = widget.offsetWidth + "px";
widgetTop = findObjPosY(widget);
widgetLeft = findObjPosX(widget);
curWidgetCover.style.left = widgetLeft + "px";
curWidgetCover.style.top = widgetTop + "px";
setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
fadeIn(curWidgetCover, 15, 75, null);
var srcString = "Widgets/" + widget.getAttribute("widgetLocation") + "/" + widget.getAttribute("widgetCodeFile") + "?" + widget.getAttribute("customValues") + "&wid=" + widget.getAttribute("widgetKey");
document.getElementById("widgetControlsHolder").style.display = "none";
if (document.all) {
widget.contentWindow.location.replace(srcString);
}
else {
widget.contentDocument.location.replace(srcString);
}
}
function loadedWidget(widget) {
if (widget.reloading == true) {
var curWidgetCover = document.getElementById("widgetCover_" + widget.getAttribute("widgetKey"));
fadeOut(curWidgetCover, 15, 0, function () { curWidgetCover.style.display = "none"; if (document.all) setOpacity(curWidgetCover, 75); });
}
widget.reloading = false;
}
var customizingWidget = null;
function showWidgetSettings(widget) {
customizingWidget = widget;
hideWidgetControls(widget);
var curWidgetCover = document.getElementById("widgetCover_" + widget.getAttribute("widgetKey"));
var curWidgetSettingsBack = document.getElementById("widgetSettingsBack");
curWidgetCover.style.height = (widget.offsetHeight + 20) + "px";
curWidgetCover.style.width = (widget.offsetWidth + 20) + "px";
curWidgetCover.className = "WidgetCover WidgetSettingsCover";
if (!document.all) setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
document.getElementById("widgetSettingsBackTop").style.height = curWidgetCover.style.height;
document.getElementById("widgetSettingsBackBottom").style.height = (((widget.getAttribute("optionsHeight") * 1) + 20) - parseInt(curWidgetCover.style.height)) + "px";
document.getElementById("widgetSettingsLoading").style.marginTop = ((widget.getAttribute("optionsWidth") * 1) / 2) + "px";
document.getElementById("widgetSettingsLoading").style.marginLeft = (((widget.getAttribute("optionsWidth") * 1) / 2) - 10) + "px";
widgetTop = findObjPosY(widget);
widgetLeft = findObjPosX(widget);
widgetWidth = widget.offsetWidth;
widgetHeight = widget.offsetHeight;
curWidgetSettingsBack.style.marginLeft = (widgetLeft + 192) + "px";
curWidgetCover.style.left = (widgetLeft) + "px";
curWidgetCover.style.top = (widgetTop) + "px";
//widgetControls.style.left = (widgetLeft) + "px";
curWidgetSettingsBack.style.top = findObjPosY(curWidgetCover) + "px";
if (document.all) curWidgetSettingsBack.style.top = (findObjPosY(curWidgetCover) + 2) + "px";
curWidgetSettingsBack.style.height = curWidgetCover.style.height;
curWidgetSettingsBack.style.width = "0px";
if (!document.all) setOpacity(curWidgetSettingsBack, 0);
if (!document.all) setOpacity(curWidgetCover, 0);
curWidgetSettingsBack.style.display = "block";
if (!document.all) fadeIn(curWidgetCover, 15, 50, null);
if (!document.all) fadeIn(curWidgetSettingsBack, 15, 50, null);
resizeObject(curWidgetSettingsBack, (widget.getAttribute("optionsWidth") * 1) + 20, (widget.getAttribute("optionsHeight") * 1) + 20, "r", "b", 5, 5, null, null, "fs", null);
/*curWidgetSettingsBack.style.height = ((widget.getAttribute("optionsHeight")*1) + 20) + "px";
curWidgetSettingsBack.style.width = ((widget.getAttribute("optionsWidth") * 1) + 20) + "px";*/
var ifrmWidgetSettings = document.getElementById("widgetSettings");
ifrmWidgetSettings.style.left = (widgetLeft + widgetWidth+23) + "px";
ifrmWidgetSettings.style.top = (parseInt(curWidgetSettingsBack.style.top) + 10) + "px";
ifrmWidgetSettings.style.height = widget.getAttribute("optionsHeight") + "px";
ifrmWidgetSettings.style.width = widget.getAttribute("optionsWidth") + "px";
var srcString = "Widgets/" + widget.getAttribute("widgetLocation") + "/Settings.aspx?wid=" + widget.getAttribute("widgetKey") + "&" + widget.getAttribute("customValues");
if (document.all) {
ifrmWidgetSettings.contentWindow.location.replace(srcString);
}
else {
ifrmWidgetSettings.contentDocument.location.replace(srcString);
}
}
function widgetSettingsLoaded() {
if (customizingWidget != null) {
var ifrmWidgetSettings = document.getElementById("widgetSettings");
ifrmWidgetSettings.style.display = "block";
}
}
function widgetCloseSettings() {
if (customizingWidget == null) return;
var ifrmWidgetSettings = document.getElementById("widgetSettings");
ifrmWidgetSettings.style.display = "none";
document.getElementById("widgetSettingsBack").style.display = "none";
document.getElementById("widgetCover_" + customizingWidget.getAttribute("widgetKey")).style.display = "none";
customizingWidget = null;
}
function widgetSaveSettings(settingsString) {
lastWidgetFocus = customizingWidget;
var ifrmWidgetSettings = document.getElementById("widgetSettings");
ifrmWidgetSettings.style.display = "none";
document.getElementById("widgetSettingsBack").style.display = "none";
document.getElementById("widgetCover_" + customizingWidget.getAttribute("widgetKey")).style.display = "none";
lastWidgetFocus.reloading = true;
var curWidgetCover = document.getElementById("widgetCover_" + lastWidgetFocus.getAttribute("widgetKey"));
curWidgetCover.className = "WidgetCover";
curWidgetCover.style.height = lastWidgetFocus.offsetHeight + "px";
curWidgetCover.style.width = lastWidgetFocus.offsetWidth + "px";
widgetTop = findObjPosY(lastWidgetFocus);
widgetLeft = findObjPosX(lastWidgetFocus);
curWidgetCover.style.left = widgetLeft + "px";
curWidgetCover.style.top = widgetTop + "px";
setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
fadeIn(curWidgetCover, 15, 75, null);
var srcString = lastWidgetFocus.getAttribute("widgetCodeFile") + "?" + settingsString + "&savesettings=yes&wid=" + lastWidgetFocus.getAttribute("widgetKey");
lastWidgetFocus.setAttribute("customValues", settingsString);
if (document.all) {
lastWidgetFocus.contentWindow.location.replace(srcString);
}
else {
lastWidgetFocus.contentDocument.location.replace(srcString);
}
customizingWidget = null;
}
function widgetRestoreDefaults(settingsString) {
lastWidgetFocus = customizingWidget;
var ifrmWidgetSettings = document.getElementById("widgetSettings");
ifrmWidgetSettings.style.display = "none";
document.getElementById("widgetSettingsBack").style.display = "none";
document.getElementById("widgetCover_" + customizingWidget.getAttribute("widgetKey")).style.display = "none";
lastWidgetFocus.reloading = true;
var curWidgetCover = document.getElementById("widgetCover_" + lastWidgetFocus.getAttribute("widgetKey"));
curWidgetCover.className = "WidgetCover";
curWidgetCover.style.height = lastWidgetFocus.offsetHeight + "px";
curWidgetCover.style.width = lastWidgetFocus.offsetWidth + "px";
widgetTop = findObjPosY(lastWidgetFocus);
widgetLeft = findObjPosX(lastWidgetFocus);
curWidgetCover.style.left = widgetLeft + "px";
curWidgetCover.style.top = widgetTop + "px";
setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
fadeIn(curWidgetCover, 15, 75, null);
var srcString = lastWidgetFocus.getAttribute("widgetCodeFile") + "?" + settingsString + "&restoredefaults=yes&wid=" + lastWidgetFocus.getAttribute("widgetKey");
lastWidgetFocus.setAttribute("customValues", settingsString);
if (document.all) {
lastWidgetFocus.contentWindow.location.replace(srcString);
}
else {
lastWidgetFocus.contentDocument.location.replace(srcString);
}
customizingWidget = null;
}
var widgetIsDragging = false;
var widgetDragCover;
var widgetHolderTop;
var widgetHolderBottom;
var arWidgetModIDs = new Array();
var arWidgetModHeight = new Array();
var arWidgetLocationTop = new Array();
var arWidgetLocationBottom = new Array();
var widgetDragHeight;
var dragWidgetPos;
function widgetStartDragging() {
return;
var draggingWidget = lastWidgetFocus;
var curScroll = document.documentElement.scrollTop;
widgetDragCover = document.getElementById("widgetDragOverlay");
widgetIsDragging = true;
arWidgetModHeight = arWidgetsHeights.slice();
arWidgetModIDs = arWidgetIDs.slice();
widgetDragHeight = arWidgetsHeights[lastWidgetFocus.getAttribute("wpos")];
dragWidgetPos = lastWidgetFocus.getAttribute("wpos") * 1;
arWidgetModHeight.splice(dragWidgetPos, 1);
arWidgetModIDs.splice(dragWidgetPos, 1);
for (wN = 0; wN < arWidgetModHeight.length; wN++) {
if (wN == 0) {
arWidgetLocationTop[wN] = 0;
arWidgetLocationBottom[wN] = arWidgetModHeight[wN];
}
else {
arWidgetLocationTop[wN] = (arWidgetLocationBottom[wN - 1] * 1) + 25;
arWidgetLocationBottom[wN] = (arWidgetLocationTop[wN] * 1) + (arWidgetModHeight[wN] * 1);
}
}
movedWidget = null;
var nextWidget = document.getElementById("wsep_" + dragWidgetPos);
if (nextWidget != null) {
movedWidget = nextWidget;
nextWidget.style.marginTop = ((widgetDragHeight * 1) + 50) + "px";
curWidgetMovedPos = dragWidgetPos;
}
draggingWidget.className = "WidgetDrag";
draggingWidget.style.top = (findObjPosY(widgetControls) + 24) + "px"
document.documentElement.scrollTop = curScroll;
widgetHolderBottom = findObjPosY(document.getElementById("closeBarLeft"));
widgetDragCover.style.top = "0px";
widgetDragCover.style.height = document.body.offsetHeight + "px";
widgetDragCover.style.display = "block";
//var curScrollPos = document.documentElement.scrollTop || document.body.scrollTop;
widgetContainer.removeChild(document.getElementById("wsep_" + (dragWidgetPos + 1)));
document.body.setAttribute("style", "user-select: none; -khtml-user-select: none; -moz-user-select: none;");
}
function widgetSavedReorder() {
savedWidget.reloading = true;
widgetControls.style.display = "none";
hideWidgetWait();
if (document.all) {
savedWidget.contentWindow.location.replace(oldSrc);
}
else {
savedWidget.contentDocument.location.replace(oldSrc);
}
savedWidget.className = "IFrameWidgetSettings";
widgetDragCover.style.display = "none";
movedWidget = null;
savedWidget = null;
oldSrc = "";
}
var savedWidget = null;
var oldSrc = "";
function widgetReorder() {
return;
movedWidget.style.marginTop = "0px";
var cloneWidget = curTargetWidget.cloneNode(true);
var cloneCover = document.getElementById("widgetCover_" + curTargetWidget.getAttribute("widgetkey"));
if (document.all) {
oldSrc = curTargetWidget.contentWindow.location.toString();
}
else {
oldSrc = curTargetWidget.contentDocument.location.toString();
}
widgetContainer.removeChild(curTargetWidget);
widgetContainer.removeChild(cloneCover);
var newSep = document.createElement("div");
cloneWidget.className = "WidgetFocus";
widgetContainer.insertBefore(cloneWidget, movedWidget);
widgetContainer.insertBefore(cloneCover, cloneWidget);
widgetContainer.insertBefore(newSep, cloneCover);
widgetControls.style.top = (findObjPosY(cloneWidget) - 23) + "px";
var foundWidget = 0;
var wids = "";
var worder = "";
for (cN = 0; cN < widgetContainer.childNodes.length; cN++) {
if (widgetContainer.childNodes[cN].getAttribute("widgetKey") * 1 > 0) {
widgetContainer.childNodes[cN - 2].id = "wsep_" + foundWidget;
clearInterval(widgetContainer.childNodes[cN - 2].moveID);
widgetContainer.childNodes[cN - 2].style.marginTop = "0px";
var foundKey = widgetContainer.childNodes[cN].getAttribute("widgetKey");
if (wids == "") {
wids = foundKey;
worder = foundWidget;
}
else {
wids = wids + "♠" + foundKey;
worder = worder + "♠" + foundWidget;
}
widgetContainer.childNodes[cN - 1].id = "widgetCover_" + foundKey;
widgetContainer.childNodes[cN].setAttribute("wpos", foundWidget);
arWidgetIDs[foundWidget] = foundKey;
arWidgetsHeights[foundWidget] = parseInt(widgetContainer.childNodes[cN].getAttribute("height")) * 1;
foundWidget++;
}
}
//widgetContainer.lastChild.id = "wsep_" + (foundWidget);
savedWidget = cloneWidget;
var curWidgetCover = cloneCover;
curWidgetCover.className = "WidgetCover";
curWidgetCover.style.height = cloneWidget.offsetHeight + "px";
curWidgetCover.style.width = cloneWidget.offsetWidth + "px";
setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
fadeIn(curWidgetCover, 15, 75, null);
var srcString = "Widgets/wfunc.aspx?action=saveorder&widheight=" + parseInt(cloneWidget.getAttribute("height")) + "&widicon=" + cloneWidget.getAttribute("widgetLocation") + "&wids=" + wids + "&worder=" + worder;
if (document.all) {
cloneWidget.contentWindow.location.replace(srcString);
}
else {
cloneWidget.contentDocument.location.replace(srcString);
}
}
function showWidgetWait() {
for (cC = 0; cC < widgetControls.childNodes.length; cC++) {
try {
widgetControls.childNodes[cC].style.display = "none";
}
catch (err) {
}
}
document.getElementById("widgetWait").style.display = "block";
}
function hideWidgetWait() {
for (cC = 0; cC < widgetControls.childNodes.length; cC++) {
try {
widgetControls.childNodes[cC].style.display = "block";
}
catch (err) {
}
}
document.getElementById("widgetWait").style.display = "none";
}
function widgetConfirmRemove(widget) {
customizingWidget = widget;
hideWidgetControls(widget);
var curWidgetCover = document.getElementById("widgetCover_" + widget.getAttribute("widgetKey"));
var curWidgetSettingsBack = document.getElementById("widgetSettingsBack");
curWidgetCover.style.height = (widget.offsetHeight + 20) + "px";
curWidgetCover.style.width = (widget.offsetWidth + 20) + "px";
curWidgetCover.className = "WidgetCover WidgetSettingsCover";
widgetTop = findObjPosY(widget);
widgetLeft = findObjPosX(widget);
widgetWidth = widget.offsetWidth;
widgetHeight = widget.offsetHeight;
if (!document.all) setOpacity(curWidgetCover, 0);
curWidgetCover.style.display = "block";
curWidgetCover.style.left = (widgetLeft) + "px";
curWidgetCover.style.top = (widgetTop) + "px";
document.getElementById("widgetSettingsBackTop").style.height = curWidgetCover.style.height;
document.getElementById("widgetSettingsBackBottom").style.height = (((widget.getAttribute("optionsHeight") * 1) + 20) - parseInt(curWidgetCover.style.height)) + "px";
document.getElementById("widgetSettingsLoading").style.marginTop = ((widget.getAttribute("optionsWidth") * 1) / 2) + "px";
document.getElementById("widgetSettingsLoading").style.marginLeft = (((widget.getAttribute("optionsWidth") * 1) / 2) - 10) + "px";
curWidgetSettingsBack.style.top = findObjPosY(curWidgetCover) + "px";
if (document.all) curWidgetSettingsBack.style.top = (findObjPosY(curWidgetCover) + 2) + "px";
curWidgetSettingsBack.style.marginLeft = (widgetLeft + 192) + "px";
curWidgetSettingsBack.style.height = curWidgetCover.style.height;
curWidgetSettingsBack.style.width = "0px";
curWidgetSettingsBack.style.height = curWidgetCover.style.height;
curWidgetSettingsBack.style.width = "0px";
if (!document.all) setOpacity(curWidgetSettingsBack, 50);
if (!document.all) setOpacity(curWidgetCover, 50);
curWidgetSettingsBack.style.display = "block";
document.getElementById("widgetRemoveHeader").innerHTML = "Confirm Widget Removal";
document.getElementById("widgetRemoveText").innerHTML = "Are you sure you want to remove this widget?
Doing so will remove it from your widgets bar, and delete any customization you may have done for this widget.
No other widget, including those of the same type, will be effected. You can add this widget again from 'My Widgets'."; var confirmDialog = document.getElementById("widgetRemoveDialog"); confirmDialog.style.left = (widgetLeft + widgetWidth + 23) + "px"; if (document.all) confirmDialog.style.left = (widgetLeft + widgetWidth + 23) + "px"; confirmDialog.style.top = (parseInt(curWidgetSettingsBack.style.top) + 10) + "px"; confirmDialog.style.height = curWidgetCover.style.height; confirmDialog.style.width = "120px"; confirmDialog.style.display = "block"; resizeObject(curWidgetSettingsBack, 340, 210, "r", "b", 5, 5, null, null, "fs", null); resizeObject(confirmDialog, 320, 200, "r", "b", 5, 5, null, null, "fs", null); /*curWidgetSettingsBack.style.height = ((widget.getAttribute("optionsHeight")*1) + 20) + "px"; curWidgetSettingsBack.style.width = ((widget.getAttribute("optionsWidth") * 1) + 20) + "px";*/ } function widgetRemove() { var remWidget = customizingWidget; document.getElementById('widgetRemoveDialog').style.display = 'none'; widgetCloseSettings(); var curWidgetCover = document.getElementById("widgetCover_" + remWidget.getAttribute("widgetKey")); curWidgetCover.className = "WidgetCover"; curWidgetCover.style.height = remWidget.offsetHeight + "px"; curWidgetCover.style.width = remWidget.offsetWidth + "px"; widgetTop = findObjPosY(remWidget); widgetLeft = findObjPosX(remWidget); curWidgetCover.style.left = widgetLeft + "px"; curWidgetCover.style.top = widgetTop + "px"; setOpacity(curWidgetCover, 0); curWidgetCover.style.display = "block"; fadeIn(curWidgetCover, 15, 75, null); var srcString = "Widgets/wfunc.aspx?action=remove&wid=" + remWidget.getAttribute("widgetKey"); if (document.all) { remWidget.contentWindow.location.replace(srcString); } else { remWidget.contentDocument.location.replace(srcString); } } function widgetDeleted(wID) { var remWidget = document.getElementById("widget_" + wID); var remCover = remWidget.previousSibling; //var remSep = remCover.previousSibling; widgetControls.style.display = "none"; hideWidgetWait(); remCover.style.display = "none"; //widgetContainer.removeChild(remSep); widgetContainer.removeChild(remCover); widgetContainer.removeChild(remWidget); scanWidgets(); } function widgetError(errorCode, wid, errorText) { if (errorCode == "wronguser") { alert("The logged in user does not match the owner of this widget"); } document.getElementById("widgetCover_" + wid).style.display = "none"; widgetControls.style.display = "none"; hideWidgetWait(); } function widgetsCheckOnLoad() { showGotoTop(null, true); getWidgetContainer(); if (widgetContainer == null) return; var foundWidget = 0; var wids = ""; var worder = ""; for (cN = 0; cN < widgetContainer.childNodes.length; cN++) { if (widgetContainer.childNodes[cN].getAttribute("widgetKey") * 1 > 0) { var srcString; if (document.all) { scrString = widgetContainer.childNodes[cN].contentWindow.location; } else { srcString = widgetContainer.childNodes[cN].contentDocument.location; } //alert(widgetContainer.childNodes[cN].getAttribute("widgetCodeFile") + " " + srcString); //alert(widgetContainer.childNodes[cN].src + " " + srcString); var strGoto = widgetContainer.childNodes[cN].src; if (strGoto != srcString) { if (document.all) { widgetContainer.childNodes[cN].contentWindow.location.replace(strGoto); } else { widgetContainer.childNodes[cN].contentDocument.location.replace(strGoto); } } foundWidget++; } } //widgetContainer.lastChild.id = "wsep_" + (foundWidget); } function widgetsReloadAll() { for (cN = 0; cN < widgetContainer.childNodes.length; cN++) { if (widgetContainer.childNodes[cN].getAttribute("widgetKey") * 1 > 0) { reloadWidget(widgetContainer.childNodes[cN]); } } } var moveVal = -10; var menuHolder; var menuMoveID; function startMainMenuMove(moveButton) { if (moveButton == "right") { moveVal = -10; } else { moveVal = 10; } menuHolder = document.getElementById("menuIconHolder"); menuMoveID = setInterval("doMainMenuMove()", 10); } function doMainMenuMove() { var newPos = parseInt(menuHolder.style.marginLeft) + moveVal; if (moveVal < 0) { if (newPos <= -350) { menuHolder.style.marginLeft = "-350px"; clearInterval(menuMoveID); return; } } else { if (newPos >= 0) { menuHolder.style.marginLeft = "0px"; clearInterval(menuMoveID); return; } } menuHolder.style.marginLeft = newPos + "px"; } function stopMainMenuMove() { clearInterval(menuMoveID); } function showIconInfo(message, icon) { if (document.all) isIE = 1; var reObj = new Object; if (isIE != 1) { reObj.fadeIn = true; reObj.fadeDelay = 50; reObj.fadeStart = 0; } reObj.resizeBox = true; reObj.resHeight = 70; reObj.resWidth = 275; reObj.resDelay = 10; reObj.resSpeedFactor = 10; reObj.resStartHeight = 0; reObj.resStartWidth = 275; reObj.resAccelerationType = "sf"; showInfoBox(icon, "iconInfo", "", "overflow:hidden;margin-left:-85px;padding-top:10px; margin-top:-10px;", "below", 17, 8, message, "bubbleBox_newblue", "font-size:12px; line-height:normal;overflow:hidden; height:50px; width:260px; text-align:center", "bubbleBox_newblue_pointer_top", "margin-left:120px; margin-top:0px", null, reObj); //showInfoBox(document.getElementById("testBox"), "trial", "", "margin-left:10px; overflow:hidden; padding-left:8px;", "right", -10, 0, "This is a black box", "bubbleBox242424", "height:19px;", "bubbleBox242424_pointer_right", "margin-top:10px;", null, reObj); //Event.add(document.getElementById("infoWidgetAdded"), "mousemove", function() { closeInfoBox("infoWidgetAdded"); }); //hideInfo = setTimeout(function() { closeInfoBox("infoWidgetAdded"); }, 5000); } function hideIconInfo() { closeInfoBox("iconInfo", true); } //------------------ top Nanner Random-------------------------------- var rotate = 0; function BannerSlide() { if (rotate== 0) { document.getElementById('banner-1').style.display = 'none'; document.getElementById('banner-2').style.display = 'block'; //document.getElementById('banner-3').style.display = 'none'; rotate = 1; } else if (rotate== 1) { document.getElementById('banner-1').style.display = 'block'; document.getElementById('banner-2').style.display = 'none'; // document.getElementById('banner-3').style.display = 'none'; rotate = 0; } else if (rotate== 2) { document.getElementById('banner-1').style.display = 'none'; document.getElementById('banner-2').style.display = 'none'; // document.getElementById('banner-3').style.display = 'block'; rotate = 1; } } function Banner() { var int = self.setInterval(function () { BannerSlide() }, 4000); /* var cur = Math.round(6 * Math.random()) var v = Math.round(cur/2); if (isEven(v)) { document.getElementById('banner-1').style.display = 'none'; document.getElementById('banner-2').style.display = 'block'; } else { document.getElementById('banner-1').style.display = 'block'; document.getElementById('banner-2').style.display = 'none'; }*/ } function isEven(n) { return /^-?\d*[02468]$/.test(n); } //-------------------------------------------------------------------- /*var zOp = 0; var startRes = 0; function zoomBox(boxID, toWidth, toHeight) { var isIE = 0; if (document.all) { isIE = 1; } if (startRes < 5 - (isIE * 4)) { startRes++; return; } var boxObj = document.getElementById(boxID); var pWidth = parseInt(boxObj.style.width); var changeFactor = (toWidth - pWidth) / ((5 - (isIE * 4)) + ((toWidth - pWidth) / 50)); if (changeFactor < 2) { boxObj.style.width = toWidth + "px"; pWidth = toWidth; }; //if (parseInt(boxObj.style.width) >= toWidth && parseInt(boxObj.offsetHeight) >= toHeight) if (pWidth >= toWidth && zOp >= 100) { //boxObj.childNodes[1 - isIE].style.opacity = "100"; boxObj.childNodes[1 - isIE].style="float:right"; clearInterval(zoomID); theForm.ctl00_loginUser_UserName.focus(); return; } if (pWidth + changeFactor < toWidth) { boxObj.style.width = (pWidth + changeFactor) + "px"; boxObj.style.left = (parseInt(boxObj.style.left) - (changeFactor / 2)) + "px"; } else { if (document.all) { //boxObj.style.width = toWidth + "px"; zOp = zOp + 10; setOpacity(boxObj.childNodes[1 - isIE], zOp); } else { //boxObj.style.width = toWidth + "px"; zOp = zOp + 10; setOpacity(boxObj.childNodes[1 - isIE], zOp); } } if (parseInt(boxObj.offsetHeight) < toHeight) { boxObj.style.height = (parseInt(boxObj.style.height) + 10) + "px"; boxObj.style.top = (parseInt(boxObj.style.top) - 5) + "px"; } } var dSlideBox; function startSlideBox(slideBoxID, resetPosition) { dSlideBox = document.getElementById(slideBoxID); dSlideBox.style.marginTop = resetPosition + "px"; clearInterval(slidingBox); if (document.all) { isIE = 1; } slidingBox = setInterval("doSlideBox(" + resetPosition + ")", 20); } function doSlideBox(resetPosition) { var curPos = parseInt(dSlideBox.style.marginTop); var setPos = -1 * (-90 + curPos) / 20; if (curPos + setPos > 3) { dSlideBox.style.marginTop = "0px"; clearInterval(slidingBox); return; } dSlideBox.style.marginTop = (curPos + setPos) + "px"; }*/ /////////// COMMON FUNCTIONS FOR SLIDING SEARCH BOX //////////// var slidingBox; function ssEndRequestHandler() { searchKeyAttached = false; ssGetChangingObjects(); searchKeyAttached = false; slideOpen = true; document.getElementById(searchButtonName).focus(); slideOpen = false; } function ssAttachKeyListner() { if (searchKeyAttached == false) { ssGetChangingObjects(); Event.add(searchBox, "keypress", function (e) { ssKeyEvent(e); }); Event.add(searchBox, "focus", function (e) { ssEnteredSearchBox(e); }); Event.add(searchBox, "blur", function (e) { ssLeftSearchBox(e); }); Event.add(document, "mouseup", function (e) { ssMouseEvent(e); }); searchKeyAttached = true; ssEnteredSearchBox(); } } function ssEnteredSearchBox() { searchBox.className = 'SearchTextBox'; searchBox.style.border = 'solid 1px #272727'; if (searchBox.value == emptyText) { searchBox.value = ""; } } function ssLeftSearchBox() { if (searchBox.value == emptyText || searchBox.value == "") { searchBox.className = 'SearchTextBox SearchEmpty'; searchBox.value = emptyText; } } function ssMouseEvent(e) { var evt = e || window.event; var targ; if (evt.target) targ = evt.target; else if (evt.srcElement) targ = evt.srcElement; if (evt.type == "mouseup") { if (searchPanel == null) { ssGetChangingObjects(); } if (isParent(targ, searchPanel.id, 0) != true && targ.id != searchBox.id && isPinned == false) { clearInterval(searchPanel.moveID); searchPanel.style.marginTop = resetPosition; searchBox.style.border = "solid 1px #dadada"; ssLeftSearchBox(); slideOpen = false; } } } function ssKeyEvent(e) { var evt = e || window.event; var targ; if (evt.target) targ = evt.target; else if (evt.srcElement) targ = evt.srcElement; if (evt.type == "keypress" && evt.keyCode == 13) { //var txtSearchName = document.getElementById("ctl00_MainContent_SearchControl1_txtSearchName"); var txtSearchBox = document.getElementById("ctl00_MainContent_SearchControl1_txtSearch"); txtSearchName.value = txtSearchBox.value; __doPostBack(postBackButton, ''); suppressDefault(evt); return false; } } function ssTogglePinUnPin() { if (isPinned == true) { isPinned = false; dPinControl.title = "Pin Search Options"; searchPanelHolder.style.position = "absolute"; searchPanel.style.marginTop = resetPosition; dPinControl.className = "IconPin16"; pinStatus.value = "Unpinned"; searchBox.focus(); } else { isPinned = true; dPinControl.title = "Unpin Search Options"; searchPanelHolder.style.position = "relative"; searchPanel.style.marginTop = '0px'; dPinControl.className = "IconUnPin16"; pinStatus.value = "Pinned"; } } //////////////////////////////////////////////////////////////////////////////////////////////