function show_indicator(){


	el = document.getElementById('indicator');
	el.style.display = "block";
	return true

}

function set_border(status){

	var frame_border = document.getElementById("content_border");

	if (status == 1){
		frame_border.style.border = "1px solid #DCDCDC";
	} else {
		frame_border.style.border = "0px solid #DCDCDC";
	}
}


// For swapping rollover image objects
function swapImage(imgDocID, imgObjName){
	if(!document.images){
		return;
	}else{
		document.images[imgDocID].src = eval(imgObjName + ".src")
	}
}

// Return an item's ID value
function getId(id){
  return document.getElementById(id)
}

// swaps the content of one block with the content of another
function swapDivContent(putThisItem, intoThisItem){ 
	var y,z;
	z = getId(putThisItem);
	y = getId(intoThisItem);
	y.innerHTML = z.innerHTML;
}


// FLASH DETECT
function showFlashOrImage(width,height,name,imgSrc,flashSrc,flashVer){
	
	var MM_contentVersion = flashVer;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	var return_string = "";
	
	if (plugin) {
			
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");

		for (var i = 0; i < words.length; ++i)
		{
			if (isNaN(parseInt(words[i])))
				continue;
			var MM_PluginVersion = words[i]; 
		}

		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		
		var e;
		
		try{
			var t = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + MM_contentVersion);
			MM_FlashCanPlay = true;
		}
		catch(e) {
			MM_FlashCanPlay = false;
		}
	}

	if (MM_FlashCanPlay) {
		
		return_string +='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
		return_string +='  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
		return_string +=' id="' + name + '" width="' + width + '" height="' + height + '">';
		return_string +=' <param name="movie" value="' + flashSrc + '">'; 
		return_string +=' <param name="quality" value="high">'; 
		return_string +=' <param name="wmode" value="transparent">'; 
		return_string +=' <embed src="' + flashSrc + '" quality=high wmode="transparent"';
		return_string +=' swliveconnect="false" width="' + width + '" height="' + height + '" name="' + name + '"';
		return_string +=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
		return_string +=' </embed>';
		return_string +='</object>';
	}
	else{
		return_string +='<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="' + imgSrc + '" width="' + width + '" height="' + height + '" name="' + name + '" border="0" alt="Click here to get the Flash plugin" /></a>';
	}

	return return_string;
}



function set_state(el, state) {

	switch (state) {
	case 0:	// normal
		el.style.borderColor = "#3A474E";
		break;
	case 1: // highlighted
		el.style.borderColor = "#ffffff";
		break;
	case 2: // selected
		el.style.borderColor = "#6AFF0D";
		break;
	}
}

function over(name) {
	el = document.getElementById(name);
	if (el != selected) {
		set_state(el, 1);
		highlighted = el;
	}
}

function out(name) {
	el = document.getElementById(name);
	if (el != selected) {
		set_state(el, 0);
		highlighted = null;
	}
}


function image_added_to_category(id){
	el = document.getElementById("i_"+id);
	el_para = document.getElementById("p_"+id);
	el.setAttribute("class","img_box");
	el.setAttribute("className","img_box");
	el_para.style.display="none";
}

function image_removed_from_category(id) {
	el = document.getElementById("i_"+id);
	el_para = document.getElementById("p_"+id);
	el_para.style.display="block";
	el.setAttribute("class","del");
	el.setAttribute("className","del");
}

function check_submit() {
	option = document.getElementById('category_id').value;
	if (option != -3){
		document.the_form.submit()
	}
}
