// 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 rollo(a){
	//if(bubble_start_working) {
		if (a.className.substr((a.className.length-2),2) == '_o')
			a.className=a.className.substr(0,(a.className.length-2));
		else
			a.className=a.className+'_o';
	//}
}

function rollId(a) {
	//if(bubble_start_working) {
		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) {
	//if(bubble_start_working) {
		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))+'_n'+ext;
		else
			a.src = a.src.substr(0,(a.src.length-6))+'_o'+ext;
		//alert(a.src);
	//}
}


function insert_flash (){
	parameters = '';
	file = '';
	id = '';
	width = '';
	height = '';
	bgcolor = '#ffffff';
	wmode = 'transparent';
	scale = 'showAll';
	
	for(var i=0; i<arguments.length; i++){
	    arg = arguments[i].split('=');
	  	if (arg[0] == 'file'){file = arg[1]}
		else if (arg[0] == 'id'){id = 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 if (arg[0] == 'scale'){scale = arg[1]}
		else {parameters += arguments[i] + '&'}
	}
	//alert(file + '\n' + HTMLobj + '\n' + width + '\n' +height + '\n' +bgcolor + '\n' +wmode + '\n' +parameters);
	document.getElementById(id).innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://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="scale" value="'+scale+'" />'+
	'<param name="FlashVars" value="'+parameters+'">'+
	'<embed src="'+file+'" FlashVars="'+parameters+'" quality="high" wmode="'+wmode+'" scale="'+scale+'" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="temp" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
	'</object>';
}

