﻿// JScript File
var image = null; 
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemHot.gif");
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemHotLeft.gif");
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemHotRight.gif");
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemPressed.gif");
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemPressedLeft.gif");
loadImage("ProLeaseWebControls/Schemes/TSBlue/ItemPressedRight.gif");
function loadImage(name){
	image = new Image();
	image.src = name;
}
function retrieveImageButton(element)
{		
	if(style == 3 || style == 4)
	{
		if(image == null)
			image = element.getElementsByTagName("IMG")[0]; 
	}
}

function findVisualStyleName(element)
{
	return element.className.substring(element.className.indexOf("plwcCommandButton") + "plwcCommandButton".length);
}

function onMouseOverCommandButton(element)
{
	var sVisualStyleName = findVisualStyleName(element);
	try
	{
		document.getElementById(element.id + "Inner").className = "plwcCommandButtonHotItem" + sVisualStyleName; 		
		document.getElementById(element.id + "Left").className = "plwcCommandButtonHotItemLeft" + sVisualStyleName; 	
		document.getElementById(element.id + "Right").className = "plwcCommandButtonHotItemRight" + sVisualStyleName; 	
	}
	catch(e) { } 
}

function onMouseOutCommandButton(element)
{
	var sVisualStyleName = findVisualStyleName(element);
	try
	{
		document.getElementById(element.id + "Inner").className = "plwcCommandButtonInner" + sVisualStyleName; 	
		document.getElementById(element.id + "Left").className = "plwcCommandButtonLeft" + sVisualStyleName; 	
		document.getElementById(element.id + "Right").className = "plwcCommandButtonRight" + sVisualStyleName; 	
	}
	catch(e) { } 
}

function onMouseDownCommandButton(element)
{
	var sVisualStyleName = findVisualStyleName(element);
	try
	{
		document.getElementById(element.id + "Inner").className = "plwcCommandButtonPressedItem" + sVisualStyleName; 	
		document.getElementById(element.id + "Left").className = "plwcCommandButtonPressedItemLeft" + sVisualStyleName; 	
		document.getElementById(element.id + "Right").className = "plwcCommandButtonPressedItemRight" + sVisualStyleName; 	
	}
	catch(e) { } 
}

function onMouseUpCommandButton(element)
{
	var sVisualStyleName = findVisualStyleName(element);
	try
	{
		document.getElementById(element.id + "Inner").className = "plwcCommandButtonInner" + sVisualStyleName; 	
		document.getElementById(element.id + "Left").className = "plwcCommandButtonLeft" + sVisualStyleName; 	
		document.getElementById(element.id + "Right").className = "plwcCommandButtonRight" + sVisualStyleName; 	
	}
	catch(e) { } 
}