var inc ="";
var incFrm = "";
var incDiv = "";
var locSrch;
var y;
var n;

function getcontent(xtra_file,w,h,resz)
{
if (document.domain !="")
{
var www = "http://"+document.domain;
var pg = window.location.href.split('/');
pg = pg[pg.length -1].split('.');
pg= pg[0];

inc = xtra_file + ".scr.php";
xtra_path = xtra_file.split('/');
incFrm = xtra_path[0] +"Frm";
incDiv = xtra_path[0] +"Div";

var straturl=www+"/"+wesima_extras+"/includes/getcontent.php?wesima=y&template="+template+"&inc="+inc +"&pg="+pg;

if (typeof artid !='undefined')
straturl += "&artid="+artid;

if (typeof autid !='undefined')
straturl += "&autid="+autid;

if (typeof r2author !='undefined')
straturl += "&r2author="+r2author;

if (typeof enable_comments !='undefined')
straturl += "&enable_comments="+enable_comments;

if (typeof nbid !='undefined')
straturl += "&nbid="+nbid;

    locSrch=window.location.href.split('?');
if (locSrch.length > 1)
{
    locSrch=locSrch[1];
	straturl += "&"+locSrch;
}
else
{
if (typeof catid !='undefined')
straturl += "&catid="+catid;
}
document.getElementById(incDiv).innerHTML = "<iframe id="+incFrm+" name="+incFrm+" ALLOWTRANSPARENCY='true' src='"+straturl+"' onload='setTimeout(\"getcon("+incFrm+","+resz+")\",200)' width="+w+" height="+h+" marginwidth=0 scrolling=no marginheight=0 frameborder=0 vspace=0 hspace=0></iframe>";
}
}

function getcon(ifrm,resz)
{
var frmName = ifrm.name;
if ((resz>=1) || (frmName != 'search_resultsDiv'))
{
document.getElementById(frmName).style.height=document.frames[frmName].document.body.scrollHeight+resz;
}
}

