function newImage(arg) {
	obj = new Image();
	obj.src = arg;
	return obj;
}

imgPFlag = false;
function preloadImages(basepath) {

	opt_menu_off = newImage(basepath+"img/m00.gif");
	opt_menu_over = newImage(basepath+"img/m00.gif");
	about_off = newImage(basepath+"img/m01.gif");
	about_over = newImage(basepath+"img/m01-.gif");
	artist_off = newImage(basepath+"img/m02.gif");
	artist_over = newImage(basepath+"img/m02-.gif");
	inventory_off = newImage(basepath+"img/m03.gif");
	inventory_over = newImage(basepath+"img/m03-.gif");
	current_off = newImage(basepath+"img/m04.gif");
	current_over = newImage(basepath+"img/m04-.gif");
	past_off = newImage(basepath+"img/m05.gif");
	past_over = newImage(basepath+"img/m05-.gif");
	upcoming_off = newImage(basepath+"img/m06.gif");
	upcoming_over = newImage(basepath+"img/m06-.gif");
	contact_off = newImage(basepath+"img/m07.gif");
	contact_over = newImage(basepath+"img/m07-.gif");
	publications_off = newImage(basepath+"img/m08.gif");
	publications_over = newImage(basepath+"img/m08-.gif");
	privateroom_off = newImage(basepath+"img/m09.gif");
	privateroom_over = newImage(basepath+"img/m09-.gif");
	arrowup_off = newImage(basepath+"img/arrowup.gif");
	arrowup_over = newImage(basepath+"img/arrowup-r.gif");
	arrowdown_off = newImage(basepath+"img/arrowdown.gif");
	arrowdown_over = newImage(basepath+"img/arrowdown-r.gif");

	imgPFlag = true;
}
function getDown(o) {
	if (imgPFlag) document[o].src = eval(o+"_over.src");
}

function getUp(o) {
	if (imgPFlag) document[o].src = eval(o+"_off.src");
}

function popup(loc, width, height, scrollbars) {
	var _params = "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=no,scrollbars="+scrollbars+",resizable=yes,top=" + (screen.height-height)/2 + ",left=" + (screen.width-width)/2;

	var newWin = window.open(loc, 'window', _params);
	newWin.focus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function showObj(id) {
	if (document.getElementById) document.getElementById(id).style.visibility = 'visible';
}
function hideObj(id) {
	if (document.getElementById) document.getElementById(id).style.visibility = 'hidden';
}

function hidePulldown(){
	if (document.getElementById('pulldowndiv'))
		hideObj('pulldowndiv');
}
function showPulldown() {
	if (document.getElementById('pulldowndiv'))
		showObj('pulldowndiv');
}

ypSlideOutMenu.prototype.endSlide = function() {
	this.aniTimer = window.clearTimeout(this.aniTimer)
	this.moveTo(this.open ? this.outPos : this.homePos)
	if (!this.open){
		showPulldown();
		this.setVisibility(false)
	}
	if ((this.open && !this.over) || (!this.open && this.over)) {
		this.startSlide(this.over)
	}
	
}

