var  tiobx_bgcolor = "#e4e4e4";
var  tiobx_fntcolor = "#565656";
var  min_width = 150;
var  min_height = 90;
var  tiobx_width = 350;
var  tiobx_height = 150;

function check_number(strInput){
  	if(strInput == ""||strInput == ""||strInput.length==0||strInput=="undefined") {
		return strInput;
 	 } else {	
		CheckNum = parseInt(strInput);
		if(isNaN(CheckNum)){
			return null
		} else {
			return CheckNum;
		}
	}
}


function startTioBox(){
	if(tiobx_width<min_width && check_number(tiobx_width)){
		tiobx_width = min_width;
	}
	if(tiobx_height<min_height && check_number(tiobx_height)){
		tiobx_height = min_height;
	}

document.write("<table style='border: 1px solid rgb(0, 0, 0);' bgcolor='"+tiobx_bgcolor+"' border='0' cellpadding='3' cellspacing='0' width='"+tiobx_width+"' height='"+tiobx_height+"'><tbody><tr><td><iframe id='datamain' src='http://www.tio.ch/widget/iframe_news_tio.asp?tiobx_bgcolor="+escape(tiobx_bgcolor)+"&tiobx_height="+(tiobx_height-35)+"&tiobx_width="+tiobx_width+"&tiobx_fntcolor="+escape(tiobx_fntcolor)+"' marginwidth='0' marginheight='0' hspace='0' vspace='0' scrolling='no' frameborder='0' height='"+(tiobx_height-35)+"' width='100%'></iframe></td></tr><tr><td align='right'><iframe id='wgstats' src='http://www.tio.ch/widget/widget_stats.asp' width='1' height='1' marginwidth='0' marginheight='0' hspace='0' vspace='0' scrolling='no' frameborder='0'></iframe><a href='http://www.tio.ch/widget' target='_new'><img src='http://www.tio.ch/widget/img/logo_tio.gif' height='18' width='80' border='0'></a></td></tr></tbody></table>");
}

