//stylenames = new Array();
//stylenames['backgroundColor'] = 'bgColor';

function findObj( oName, oFrame, oDoc ) {
	if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
	if( oDoc[oName] ) { return oDoc[oName]; } if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
	if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
	for( var x = 0; x < oDoc.forms.length; x++ ) { if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; } }
	for( var x = 0; x < oDoc.anchors.length; x++ ) { if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; } }
	for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
		var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document ); if( theOb ) { return theOb; } }
	if( !oFrame && window[oName] ) { return window[oName]; } if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
	for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
		var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document ); if( theOb ) { return theOb; } }
	return null;
}

function getStyleName(stdname){
	return stdname;
	/*
	if(document.all){
		return stdname;
	}else{
		return stylenames[stdname];
	}
	*/
}

function getDivStyle(id,stylename){
	stylename = getStyleName(style);
	obj = findObj(id);
	return obj.style[stylename];
	/*
	style = getStyleName(style);
	if(document.all){
		return eval('document.all.'+id+'.style.'+style);
	}else{
		return eval('document.layers.'+id+'.'+style);
	}
	*/
}

function setDivStyle(id,stylename,value){
	stylename = getStyleName(stylename);
	obj = findObj(id);
	obj.style[stylename] = value;
	/*
	style = getStyleName(style);
	if(document.all){
		eval('document.all.'+id+'.style.'+style+'="'+value+'"');
	}else{
		eval('document.layers.'+id+'.'+style+'="'+value+'"');
	}
	*/
}

function commentWindow(){
	w = window.open("/sendcomment.php","commento","alwaysRaised=yes,width=420,height=380,left=150,top=150");
}
