var lastsel = "";
function getProperty(propid){
	//var uids = 10;//document.getElementById('uid').value;
	id = 'prop_'+propid;
	//alert(propid);
	if(lastsel!=""){
		hideBorders(lastsel);
		lastsel = 'prop_'+propid;
	}else{
		lastsel = 'prop_'+propid;
	}
	hideBorder('prop_'+propid);
	init();
	xhtml.open('POST','theme_editor/handlers/handleProp.php',true);
	xhtml.onreadystatechange = handlerGetProperty;
	xhtml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xhtml.send('property='+propid);
}
/**
 * Handler for function getProperty
 */
function handlerGetProperty(){
	if(xhtml.readyState == 4){
		if(xhtml.status == 200){
			document.getElementById('propform').innerHTML = xhtml.responseText;
		}
	}
}

function hideBorder(id){
	//alert(document.getElementById(id).style.backgroundColor);
	if(document.getElementById(id)){
		document.getElementById(id).style.borderStyle = 'solid';
		document.getElementById(id).style.borderWidth = '1px';
		setTimeout("hideBorders('"+id+"')",3000);
	}
	
	//document.getElementById(id).style.borderWidth = '2px';
	//document.getElementById(id).style.borderColor = 'green';
	
}

function hideBorders(id){
	if(document.getElementById(id)){
		document.getElementById(id).style.borderStyle = 'none';
		document.getElementById(id).style.borderWidth = '0px';
	}
}
