//Prototype Windows Class
var win = null;
var index = 1;


function openDialog(id,w,h) {
    Dialog.alert($(id).innerHTML, {className: "alphacube",  width:w, height:h, id: "d" + index})
    index++;
	//document.getElementById('widget').style.display = 'none';
}

function lastDialog(id) {
    //Dialog.confirm($(id).innerHTML, {className: "alphacube",  width:250, okLabel: "Close All", ok: closeAllModalWindows})
    Dialog.confirm($(id).innerHTML, {className: "alphacube",  width:250})
}

function closeAllModalWindows() {
    Windows.closeAllModalWindows();
   // return true;
	//document.getElementById('widget').style.display = 'inline';
}

function openWallpaper(x, pwcW, pwcH)
{
	pwcW = 400;
	pwcH = 410;
	switch(x)
	
	{
		case 1:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1280x1024/ANTM_WP_1280x1024_03.jpg';
			document.getElementById('wpDescription').innerHTML = '1280x1024';
			break;

		case 2:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1024x768/ANTM_WP_1024x768_03.jpg';
			document.getElementById('wpDescription').innerHTML = '1024x768';
			break;

		case 3:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/800x600/ANTM_WP_800x600_03.jpg';
			document.getElementById('wpDescription').innerHTML = '800x600';
			break;

		case 4:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1280x1024/ANTM_WP_1280x1024_02.jpg';
			document.getElementById('wpDescription').innerHTML = '1280x1024';
			break;

		case 5:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1024x768/ANTM_WP_1024x768_02.jpg';
			document.getElementById('wpDescription').innerHTML = '1024x768';
			break;

		case 6:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/800x600/ANTM_WP_800x600_02.jpg';
			document.getElementById('wpDescription').innerHTML = '800x600';
			break;

		case 7:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1280x1024/ANTM_WP_1280x1024_01.jpg';
			document.getElementById('wpDescription').innerHTML = '1280x1024';
			break;

		case 8:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/1024x768/ANTM_WP_1024x768_01.jpg';
			document.getElementById('wpDescription').innerHTML = '1024x768';
			break;

		case 9:
			document.getElementById('wp').src = 'http://creative-origin.myspace.com/Client/TheCW/Antm/Images/Wallpapers/800x600/ANTM_WP_800x600_01.jpg';
			document.getElementById('wpDescription').innerHTML = '800x600';
			break;


		default:
			alert('something isn\'t working');
	
	}
	openDialog('wallpaperWindow',pwcW,pwcH);


}


