// This array holds the "friendly" day names
var day_names = new Array(7)
day_names[0] = "Sunday"
day_names[1] = "Monday"
day_names[2] = "Tuesday"
day_names[3] = "Wednesday"
day_names[4] = "Thursday"
day_names[5] = "Friday"
day_names[6] = "Saturday"

// This array holds the "friendly" month names
var month_names = new Array(12)
month_names[0] = "January"
month_names[1] = "February"
month_names[2] = "March"
month_names[3] = "April"
month_names[4] = "May"
month_names[5] = "June"
month_names[6] = "July"
month_names[7] = "August"
month_names[8] = "September"
month_names[9] = "October"
month_names[10] = "November"
month_names[11] = "December"

// Get the current date
date_now = new Date()

// Figure out the friendly day name
day_value = date_now.getDay()
date_text = day_names[day_value]

// Figure out the friendly month name
month_value = date_now.getMonth()
date_text += ", " + month_names[month_value]

// Add the day of the month
date_text += " " + date_now.getDate()

// Add the year
date_text += ", " + date_now.getFullYear()


function addToFavorites()
{
  var url = "http://www.dollspot.com/track/click.php?id=1";
  var title = "Dollspot.com - Doll Dressup games";
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

function displayFlash(path, width, height)
{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" WIDTH="' + width);
	document.write('" HEIGHT="' + height + '" id="FlashContent">');
	document.write('<PARAM NAME="movie" VALUE="' + path + '"><PARAM NAME="quality" VALUE="high">');
	document.write('<PARAM NAME="AllowScriptAccess" VALUE="never"><EMBED src="' + path + '"');
	document.write(' quality="high" WIDTH="' + width + '" HEIGHT="' + height + '" NAME="FlashContent"');
	document.write(' AllowScriptAccess="never" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED></OBJECT>');
}

var newWin = null;
function popUp(strURL, strType, strHeight, strWidth) {
 if (newWin != null && !newWin.closed)
   newWin.close();
 var strOptions="";
 if (strType=="console")
   strOptions="resizable,height="+
     strHeight+",width="+strWidth;
 if (strType=="fixed")
   strOptions="status,height="+
     strHeight+",width="+strWidth;
 if (strType=="elastic")
   strOptions="toolbar,menubar,scrollbars,"+
     "resizable,location,height="+
     strHeight+",width="+strWidth;
 newWin = window.open(strURL, 'newWin', strOptions);
 newWin.focus();
}

var mouseX = 0;
var mouseY = 0;

function getcords(e)
{
	mouseX = Event.pointerX(e);
	mouseY = Event.pointerY(e);
}

function showThumb( id )
{
	$('thumb_' + id).show();
	$('thumb_' + id).style.top = (mouseY + 10) + 'px';
	$('thumb_' + id).style.left = (mouseX + 10) + 'px';
}

function hideThumb( id )
{
	$('thumb_' + id).hide();
}