function addChat (cid, cw, cl) {
	if (typeof cw == 'undefined' ) cw = false;
	if (typeof cl == 'undefined' ) cl = false;

	try {
		objIFrame = document.createElement('<iframe frameborder="0" src="" scrolling="no" marginheight="0" marginwidth="0" name="_sellchat_if" id="_sellchat_if">');
	} catch (e) {
		objIFrame = document.createElement('iframe');
		objIFrame.name = '_sellchat_if';
	}

	w = (cw) ? '/' + cw.toString() : '';
	l = (cl) ? cl.toString() : 'sl';

	var languages = ['bg','cs','da','de','el','en','es','et','fi','fr','hr','hu','is','it','lt','lv','mt','nl','no','pl','pt','ro','ru','sk','sl','sr','sv','tr','uk'];
	var key = '';
	var l_found = false;
	for (key in languages) {
		if (languages[key] == l) {
			l_found = true;
			break;
		}
	}
	if (!l_found) {
		l = 'en';
	}

	objIFrame.src = 'http://www.chat-sell.si/' + l + '/Chat/' + cid + '/' + location.hostname + '' + w;
	//www.chat-sell.si
	objIFrame.height = "166px";
	objIFrame.width = (w != '') ? cw.toString() + "px" : "260px";
	objIFrame.scrolling = 'no';
	objIFrame.frameBorder = '0';
	objIFrame.marginHeight = 0;
	objIFrame.marginWidth = 0;
	objIFrame.id = '_sellchat_if';

	if (!document.getElementById ('_sellchat_data')) {
		document.write('<div id="_sellchat_data"></div>');
	}
	document.getElementById ('_sellchat_data').appendChild (objIFrame);
}

function setDimensions(h) {
	try {
		var iframe = document.getElementById('_sellchat_if');
		if (parseInt(h) == 0) {
			document.getElementById ('_sellchat_data').removeChild (iframe);
		} else {
			iframe.style.height = parseInt(h) + "px";
		}
	} catch(e) {

	}
}