if (window != top) top.location.href = location.href;

function changebg(element)
{
if (element.className == "bg1")
{
element.className = "bg2";
} else {
element.className = "bg1";
}
}


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=240,left = 480,top = 392');");
}

function highlight(field) {
	field.focus();
  	field.select();
}

function setTitleAlign(size)
{
var _txtText = document.getElementById('txtText').value;
var _flashcontrol = document.getElementById('flashcontrol').innerHTML;

switch(size){
		case 'full':
			_txtText = _txtText.replace(new RegExp(/width=\"212\"/g),'width="425"');
			_txtText = _txtText.replace(new RegExp(/width=\"142\"/g),'width="425"');
			_txtText = _txtText.replace(new RegExp(/height=\"175\"/g),'height="350"');
			_txtText = _txtText.replace(new RegExp(/height=\"117\"/g),'height="350"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=212/g),'width="425"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=142/g),'width="425"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=175/g),'height="350"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=117/g),'height="350"');
			break;
		case 'half':
			_txtText = _txtText.replace(new RegExp(/width=\"425\"/g),'width="212"');
			_txtText = _txtText.replace(new RegExp(/width=\"142\"/g),'width="212"');
			_txtText = _txtText.replace(new RegExp(/height=\"350\"/g),'height="175"');
			_txtText = _txtText.replace(new RegExp(/height=\"117\"/g),'height="175"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=425/g),'width="212"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=142/g),'width="212"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=350/g),'height="175"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=117/g),'height="175"');
			break;
		case 'tiny':
			_txtText = _txtText.replace(new RegExp(/width=\"425\"/g),'width="142"');
			_txtText = _txtText.replace(new RegExp(/width=\"212\"/g),'width="142"');
			_txtText = _txtText.replace(new RegExp(/height=\"350\"/g),'height="117"');
			_txtText = _txtText.replace(new RegExp(/height=\"175\"/g),'height="117"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=425/g),'width="142"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/width=212/g),'width="142"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=350/g),'height="117"');
			_flashcontrol = _flashcontrol.replace(new RegExp(/height=175/g),'height="117"');
			break;
}


document.getElementById('txtText').value = _txtText;
document.getElementById('flashcontrol').innerHTML = _flashcontrol;

}