<!--

function hideTip() {
	var theDiv = document.getElementById("toolTip");
	theDiv.style.left = 10;
	theDiv.style.top = 10;
	document.getElementById("ttContent").innerHTML = "";
	theDiv.style.display = "none";
	theDiv.style.visibility = "hidden";
}

function loadTip(e) {
	// remove the next line when the tooltip is finished
	return; // don't do anything, yet.
	var posx = 0;
	var posy = 0;

	var winE = window.event;

	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		alert("No pageX, pageY, but have clientX, clientY")
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	if (e) {
		// alert("got event, target is: " + e + " position? " + posx + ", " + posy +", event target: " + e.currentTarget + 
				// "e.currentTarget.class: " + e.currentTarget.innerHTML);
	}

	var theDiv = document.getElementById("toolTip");
	// alert("Event.target: " + e.currentTarget + ", Div current X: " + theDiv.style.left + " Mouse Location: " + posx + "," + posy );
	if (winE) {
		alert("have window.event: " + winE.clientX + ", " + winE.clientY);
	} else // alert("No window.event");
	if (theDiv) {
		// alert("Found object of type: " + theDiv);
		theDiv.style.display = "block";
		theDiv.style.visibility = "visible";
		// alert("Ready for move?");
		theDiv.style.left = posx + 70;
		theDiv.style.top = posy - 100;
		document.getElementById("ttContent").innerHTML = e.currentTarget.innerHTML + " Description";

/*
		var x = theDiv.xCoord;
		if (!x) alert("No X Input!");
		x.value = type.clientX;
		var y = theDiv.yCoord;
		y.value = type.clientY;


*/
	}
}

function showClassesMenu(show) {
	var myMenu = document.getElementById("classesMenu");
	if (!show) {
		myMenu.style.visibility = "hidden";
	} else {
		if (myMenu.style.visibility == "visible") return; // already there
		var positionX = 0;
		var positionY = 0;
		var descriptionsSpan = document.getElementById("descriptionsTarget");
		if (descriptionsSpan != null) {
			positionX = descriptionsSpan.offsetLeft;
			positionY = descriptionsSpan.offsetTop;
			var browser = navigator.userAgent;
			var os = navigator.platform;
			if (browser.indexOf("MSIE") > -1) { // IE is crap
				// myMenu.style.left = descriptionsSpan.offsetLeft + descriptionsSpan.offsetParent.offsetLeft;
				// myMenu.style.top = descriptionsSpan.offsetTop + descriptionsSpan.offsetParent.offsetTop;
			} else { // everybody else calculates positions correctly
				// myMenu.style.left = positionX + 16;
				// myMenu.style.top = positionY + 16;
			}
			myMenu.style.visibility = "visible";
		}

	}
}

function showItem() {
	  var display = this.document.getElementById("replacePhoto");
	  if(display != null) {
	    display.src = showItem.arguments[0]; 
	    return true;
	  }
	  // window.alert("Sorry, Item not found.");
	  return false;

}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		welcome_over = newImage("images/welcome-over.gif");
		about_Sedusa_over = newImage("images/about_Sedusa-over.gif");
		plan_party_over = newImage("images/plan_party-over.gif");
		schedule_over = newImage("images/schedule-over.gif");
		faqs_over = newImage("images/faqs-over.gif");
		shopping_over = newImage("images/shopping-over.gif");
		gift_certificate_over = newImage("images/gift_certificate-over.gif");
		testimonials_over = newImage("images/testimonials-over.gif");
		press_over = newImage("images/press-over.gif");
		links_over = newImage("images/links-over.gif");
		contact_over = newImage("images/contact-over.gif");
		preloadFlag = true;
	}
}

function enableCal() {
  var calButton = document.getElementById("viewCal");
  if(calButton) {
      calButton.disabled = false;
      //  alert("enable submit button");
  }
}

function validateCount(ctl) {
 if(isNaN(parseInt(ctl.value))) {
   alert("You must enter a valid number");
   ctl.value = "";
 }
}

function canContinue(form1,form2) {
 // alert("Validating form...");
 var pc = document.getElementById("productCount");
 if(pc != null) {
   // alert("Checking Product Count");
   if(parseInt(pc.value) == 0 || isNaN(parseInt(pc.value))) {
     alert("You have no items in your Cart.\nPlease update to continue");
   } else {
      // alert("Setting form action.");
      form2.action = "https://www.sedusastudios.com/blank.php";
      // alert("Submit!");
      form2.submit();
   }
}
}
//-->