var tgs = new Array('div','td','a');
var szs_con = new Array( '11px','13px','15px');

function ts_con( tgs,trgt,inc ) { 
	if (!document.getElementById) return;
	if (!document.getElementById(trgt)) return;
	var d = document,cEl = null,sz,i,j,cTags;
	
	sz = inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 2 ) sz = 2;
	startsz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize   = szs_con[ sz ];

	//alert(inc);
	//alert(szs_con[ sz ]);
	

	if (inc==2)			cEl.style.lineHeight = '26px';
	else if (inc==1)	cEl.style.lineHeight = '22px';
	else	   			cEl.style.lineHeight = '18px';


	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ){ 
			cTags[ j ].style.fontSize = szs_con[ sz ]; 
			if (inc==2)			cTags[ j ].style.lineHeight = '26px';
			else if (inc==1)	cTags[ j ].style.lineHeight = '22px';
			else	    		cTags[ j ].style.lineHeight = '18px';	
		}
	}
}

function setCoo(size)
{
    document.cookie='font_size'+size+'; path=/';
}

function getFontSizeFromCookie(cookie)
{
    var position = cookie.indexOf("font_size");
	
	//alert(position);

    if (position != -1) {
        return cookie.substr(position+9, 1);
    }
    return -1;
}
