

var ix_textlength=ix_width/ix_fontsize*2-1;
var lc = 1; // set line counter to 1

function trimright(mystring,mylen)
{
	if (mystring.length>mylen) 
	{
	var mypat = new RegExp("^(.{1,"+Math.round(mylen)+"} ).+$","i"); 
	mypat.exec(mystring);
	return (RegExp.$1+RegExp.$2).substring(0,mylen-2)+" ...";
	//	return mystring.substring(0,mylen)+"...";
	}
	else return mystring;
}


document.write("<style type=text/css>");

document.write(".ixbox A:link {color: "+ix_color_border+"; text-decoration: none} ");
document.write(".ixbox A:visited { color: "+ix_color_border+"; text-decoration: none} ");
document.write(".ixbox A:active { color: "+ix_color_border+"; text-decoration: none} ");
document.write(".ixbox A:hover { color: "+ix_color_border+"; text-decoration: none}");

document.write(".ixbox {font-family:"+ix_font+"; font-size:"+ix_fontsize+"px;}");
document.write(".ixref {font-family:"+ix_font+"; font-size:"+ix_fontsize/1.2+"px; }");

document.write("</style>");

document.write("<div style=\"width:"+ix_width+"px; color:"+ix_color_bg+"; background:"+ix_color_border+"; font-weight:bold; padding-left:4px; padding-top:3px; padding-bottom:3px;\" align=left class=ixbox >almaty classifieds</div><div style=\"width:"+ix_width+"px; border-left:1px dotted "+ix_color_border+"; border-right:1px dotted "+ix_color_border+"; border-bottom:1px dotted "+ix_color_border+"; padding-right:1px; padding-left:1px; padding-bottom:5px; background:"+ix_color_bg+";\">");


document.write("</div><div align=right class=ixbox style=\"width:"+ix_width+"px; padding-right:1px\"><span class=ixref><a href=\"http://almaty.ixpat.com\" target=_NEW>by almaty.ixpat.com</a></span></div>");
