﻿_width = typeof _width == 'string' ? _width : '350px';
_height  = typeof _height  == 'string' ? _height  : '350px';
_border  = 1;
//_target  = typeof _target  == 'number' ? '_blank' : '';
_theme = typeof _theme  == 'string' ? _theme: 'default';
_title = typeof _title == 'string' ? _title : "Haft Bit News";
_newsType= 1;//چه اخباری را می خواهید
_typeView= 1;// اخبار توضیحات داشته باشد یا نه

function RunScript()
{
    var src=GetSrc();
    document.write('<iframe title="navigation" frameborder="no" vspace="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" name="Widgetframe" id="Widgetframe" src="'+ src +'"   style="border:0px none;width: '+_width+';px;height:'+_height+'"></iframe>');
}
function GetSrc()
{
    if(document.location!=null)
    {
        ref=document.location.href;
    }
    var src="http://www.haftbit.com/WidgetNews.aspx?cid="+_cid+"&nt="+_newsType+"&tv="+_typeView+"&count="+_count+"&theme="+_theme+"&title="+_title
    if(_theme=='Custom')
    {
        //UpdateVarible();
        var src2="&custom_header="+custom_header+"&custom_Fontheader="+custom_Fontheader+"&custom_Border="+custom_Border+"&custom_Link="+custom_Link+"&custom_Des="+custom_Des+"&custom_Back="+custom_Back;
        var reg=/#/g;
        src2=src2.replace(reg,'');
        src=src+src2; 
    }
    return src+"&ref="+ref;
}
RunScript();




