function freePreview (document, perf_name, configuration, w, h) {
    var swf = vctp_url+'/flash/chat/limitedFreePreview20_vctp.swf';
    var FlashVars = '';
    if(active_user.user_name != '') {
        swf = vctp_url+'/flash/chat/freePreview20_vctp.swf';
    } else {
        FlashVars = FlashVars + 'timeLimit=30000';
    }
    var performer = checkOnline(perf_name);
    FlashVars = 'channel='+performer.user_id
                + '&performerID='+performer.user_id
                + '&userType=&sessionType=110'
                + '&langID='+configuration.Language
		+ '&hd='+performer.hd
                + '&webID=preview'
                + '&userSiteID='
                + '&ban=0&combit=3'
                + '&copyright_arg='+configuration.Copyright
                + '&photo=http://imageup.dxlive.com/WebArchive/'+perf_name+'/flash/LinkedImage.jpg';
    if (w == undefined) var w = '480';
    if (h == undefined) var h = '360';

    document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width='+w+' height='+h+' id="video_chat" align="">');
    document.writeln('<PARAM name="movie" value="'+swf+'">');
    document.writeln('<param name=FlashVars value="'+FlashVars+'" />');
    document.writeln('<PARAM name="salign" value="LT">');
    document.writeln('<PARAM name="quality" value="high">');
    document.writeln('<PARAM name="bgcolor" value="#006666">');
    document.writeln('<param name="allowScriptAccess" value="always">');
    document.writeln('<embed src="'+swf+'" salign="LT" FlashVars="'+FlashVars+'" allowScriptAccess="always" quality="high" bgcolor="#006666" width='+w+' height='+h+' name="video_chat" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.writeln('</OBJECT>');
}


function openViewersChatFS (document, performer, configuration, w, h, stype) {
    if (w == undefined) var w = '760';
    if (h == undefined) var h = '430';
    var vctp_param = "?vctp_site="+configuration.VSite;
    var mode_str = "";
    var points_str = configuration.points;
    if(stype == undefined) var stype = '115';
    if(active_user.user_name != '') {
        var chatmode = getCookie('vm');
        stype = (chatmode=='ROM') ? 120 : stype;
    }

    vctp_param += '&promo_points='+points_str;
    vctp_param += '&show_add_points='+configuration.show_add_points+'&goods_points_205='+configuration.goods_points_205;
    vctp_param += '&copyright_arg='+configuration.Copyright;
    if (configuration.point_error_message=='off') vctp_param += '&point_error_message=off';
    window.open(vctp_url + '/chat/'+performer+'/'+stype+vctp_param, performer, 'resizable=yes,toolbar=no,scrollbars=no,personalbar=no,menubar=no,width='+w+',height='+h);
}
  


