// JavaScript Document
function getElementsByClass(tag,className) {
	var classElements = new Array();
	if ( tag == null ){
		tag = '*';
	}
	var allTags = document.getElementsByTagName(tag);
	var allTagsLen = allTags.length;
	for (var i = 0; i < allTagsLen; i++) {
		if ( allTags[i].className == className) {
			classElements[j] = allTags[i];
		}
	}
	return classElements;
}
function setHeight( srcMovie, srcNewH ) {
	if(thisMovie(srcMovie).clientHeight != srcNewH){
		thisMovie(srcMovie).style.height = srcNewH;
	}
}
function thisMovie(movieName) {
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}
/*function styleclass( class, swfMovie, props ) {
	//
	var movieName = divId+"_swf";
    var width = document.getElementById(divId).clientWidth;
	var text = document.getElementById(divId).innerHTML;
	document.getElementById(divId).innerHTML = "";
	//
	var height = 10;
	var splitHeight = props.textHeight.split(" ");
	if(splitHeight.length > 1){
		//
		height += Number(splitHeight[0]);
		//
	}
	//
	var so = new SWFObject(swfMovie, movieName, width.toString(), height, "8", "#FFFFFF");
	so.addParam("wmode", "transparent");
	so.addParam("allowScriptAccess", "always");
	so.addVariable("movieName", movieName);
	//
	so.addVariable("text", text);
	so.addVariable("textColor", props.textColor);
	so.addVariable("alpha", props.alpha);
	so.addVariable("textHeight", splitHeight[0]+" px");
	//
	document.getElementById(divId).style.visibility = "visible";
	so.write(divId);
	//
}*/
function styleId( divId, swfMovie, props ) {
	//
	if(document.getElementById(divId)){
		//
		var movieName = divId+"_swf";
		var width = document.getElementById(divId).clientWidth;
		var text = document.getElementById(divId).innerHTML;
		document.getElementById(divId).innerHTML = "";
		//
		var height = 10;
		var splitHeight = props.textHeight.split(" ");
		if(splitHeight.length > 1){
			//
			height += Number(splitHeight[0]);
			//
		}
		//
		var so = new SWFObject(swfMovie, movieName, width.toString(), height, "8", "#FFFFFF");
		so.addParam("wmode", "transparent");
		so.addParam("allowScriptAccess", "always");
		so.addVariable("movieName", movieName);
		//
		so.addVariable("text", text);
		so.addVariable("textColor", props.textColor);
		so.addVariable("alpha", props.alpha);
		so.addVariable("textHeight", splitHeight[0]+" px");
		//
		document.getElementById(divId).style.visibility = "visible";
		so.write(divId);
		//
	}
	
	//
}
function styleTag( htmlTag, swfMovie, props ) {
	//
	var i = 0;
	while(i <document.getElementsByTagName(htmlTag).length ){	
		
		var movieName = htmlTag+"_"+i;
		var width = document.getElementsByTagName(htmlTag)[i].clientWidth;
		var text = document.getElementsByTagName(htmlTag)[i].innerHTML;
		document.getElementsByTagName(htmlTag)[i].innerHTML = "";
		//
		var height = 10;
		var splitHeight = props.textHeight.split(" ");
		if(splitHeight.length > 1){
			//
			height += Number(splitHeight[0]);
			//
		}
		//
		var so = new SWFObject(swfMovie, movieName, width.toString(), height, "8", "#FFFFFF");
		so.addParam("wmode", "transparent");
		so.addParam("allowScriptAccess", "always");
		so.addVariable("movieName", movieName);
		//
		so.addVariable("text", text);
		so.addVariable("textColor", props.textColor);
		so.addVariable("alpha", props.alpha);
		so.addVariable("textHeight", splitHeight[0]+" px");
		//
		document.getElementsByTagName(htmlTag)[i].id = htmlTag+i;
		
		//
		document.getElementsByTagName(htmlTag)[i].style.visibility = "visible";
		so.write(document.getElementsByTagName(htmlTag)[i].id);
		//
		i++;
	}
	//
}
/*document.body.onmousedown = function(){
	//alert(document.getElementsByTagName("header1_swf").length);
	
		thisMovie("header1_swf").deselect();
	/*var i =0;
	while(i <document.getElementsByTagName("header1").length ){
		var movieName = "header1_"+i;
		thisMovie(movieName).deselect();
		i++;	
	}
}*/

