// JavaScript Document

function roll(a) {
	a.style.cursor='pointer';
	if (a.className.substr((a.className.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.className=a.className.substr(0,(a.className.length-1))+b;
}

function rollId(a) {
	a.style.cursor='pointer';
	if (a.id.substr((a.id.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.id=a.id.substr(0,(a.id.length-1))+b;
}

function rollimg(a) {
	a.style.cursor='pointer';
	ext = a.src.substr((a.src.length-4),4);
	state = a.src.substr((a.src.length-6),2);
	if (state == '_o')
		a.src=a.src.substr(0,(a.src.length-6))+ext;
	else
		a.src=a.src.substr(0,(a.src.length-4))+'_o'+ext;
}

function popPic(){
}
function room_details(room){
	if (document.getElementById('div_'+room.id).style.display == 'none'){
		document.getElementById('div_'+room.id).style.display = "block";
		document.getElementById(room.id).innerHTML = '&nbsp;' + 'close details' + '&nbsp;';
	} else {
		document.getElementById('div_'+room.id).style.display = "none";
		document.getElementById(room.id).innerHTML = '&nbsp;' + 'open details' + '&nbsp;';
		}
	document.getElementById("main_table").height = "99%";
	setTimeout('document.getElementById("main_table").height = "100%";', 0);
}

function insert_flash (){
	parameters = '';
	file = '';
	HTMLobj = '';
	width = '';
	height = '';
	bgcolor = '#ffffff';
	wmode = 'transparent';
	
	for(var i=0; i<arguments.length; i++){
	    arg = arguments[i].split('=');
	  	if (arg[0] == 'file'){file = arg[1]}
		else if (arg[0] == 'HTMLobj'){HTMLobj = arg[1]}
		else if (arg[0] == 'width'){width = arg[1]}
		else if (arg[0] == 'height'){height = arg[1]}
		else if (arg[0] == 'bgcolor'){bgcolor = arg[1]}
		else if (arg[0] == 'wmode'){wmode = arg[1]}
		else {parameters += arguments[i]}
	}
	//alert(file + '\n' + HTMLobj + '\n' + width + '\n' +height + '\n' +bgcolor + '\n' +wmode + '\n' +parameters);
	document.getElementById(HTMLobj).innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="temp" align="middle">'+
	'<param name="allowScriptAccess" value="sameDomain" />'+
	'<param name="movie" value="'+file+'" />'+
	'<param name="quality" value="high" />'+
	'<param name="bgcolor" value="'+bgcolor+'" />'+
	'<param name="wmode" value="'+wmode+'" />'+
	'<param name="FlashVars" value="'+parameters+'">'+
	'<embed src="'+file+'" FlashVars="'+parameters+'" quality="high" wmode="'+wmode+'" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="temp" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />'+
	'</object>';
}
