//$URL: https://svn.pvtool.net/svn/day_vwcms/trunk/contentbus/filesystem/files/apps/vwcms_common/docroot/vwcms_common/js/common.js $
//$Id: common.js 987 2004-12-02 20:16:29Z mwehner $

function openWindow(url, target, width, height, centered) {
    if (centered == true && (navigator.appName.indexOf("Netscape") > -1 && parseInt(navigator.appVersion.substring(0,1)) >=4 )
        || (navigator.appName.indexOf("Microsoft Internet Explorer") > -1 && parseInt(navigator.appVersion.substring(0,1)) >=4 )) {
        var w = (screen.width/2)-(width/2); 
        var h = (screen.height/2)-(height/2); 
        var parameter = "scrollbars=yes,resizable=1";
        
        if (width != 0) {
            parameter += ',width=' + width + ', screenX=' + w + ',left=' + w;
        }
        if (height != 0) {
            parameter += ',height=' + height + ', screenY=' + h + ',top=' + h;
        }
    } else {
        var parameter = "scrollbars=yes,resizable=1";
        if (width != 0) {
            parameter += ',width=' + width;
        }
        if (height != 0) {
            parameter += ',height=' + height;
        }
    }
    var win = window.open(url, target, parameter);
    if (win) {
        win.focus();
    }
}


function RenderContent(url, gid, nid, lang){
      
       $.jmsajax({
                type: "POST",
                url: "default.aspx",
                method: "RenderContent",
                data: {URL:url, Lang:lang, GID:gid, NID:nid},
                success: function(data) {
                
                   
                    $("#Content").fadeIn("fast",function() {$(this).html(String(data))});                   
                }
                
                
       });
       
        if (gid == '0' || gid == '2') $('#ContentNew').hide();
        if (gid == '0' || nid == '0') $('#ContentNewDetails').hide();
       
         
         if (gid == '0') $('#ContentNewDetails').hide();
         if (gid == '2')  $('#ContentNewDetails').show();
         
         
        
        
       
}

