function g(id) {
	return document.getElementById(id);
}

function gv(id) {
	return document.getElementById(id).value;
}

function sv(id,val) {
	return document.getElementById(id).value = val;
}

function sbg(id,src) {
	document.getElementById(id).style.backgroundImage='url(' + src + ')';
}

function lo(location) {
	document.location = location;
}

function bookmark(title,url){
	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 flash(w, h, path) { 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">' 
	+'<param name="movie" value="'+path+'" />' 
	+'<param name="wmode" value="transparent" />' 
	+'<param name="quality" value="high" />' 
	+'<param name="menu" value="0" />' 
	+'<embed  src="'+path+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0" wmode="opaque"></embed>' 
	+'</object>'); 
}

function flash_with_param(w, h, path, param_name, param_value) { 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">' 
	+'<param name="movie" value="'+path+'" />' 
	+'<param name="FlashVars" value="'+param_name+' = '+param_value+'" />' 
	+'<param name="wmode" value="transparent" />' 
	+'<param name="quality" value="high" />' 
	+'<param name="menu" value="0" />' 
	+'<embed  src="'+path+'" width="'+w+'" height="'+h+'" quality="high" FlashVars="'+param_name+'='+param_value+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0" wmode="transparent"></embed>' 
	+'</object>'); 
}
