﻿var ie = (document.getElementById)?true:false;
var window_width = (ie)? screen.width-20 : screen.width;
var window_height = screen.height;
var clipBaseUrl = "http://www.optiopublishing.com/media/";
//var clipBaseUrl = "http://testbed.optiopublishing.com/media/";
var clipOwnerID = "da1b9d52c32c51662157e4f18d052aed";
//var clipOwnerID = "dfd63ece4295cda45f4823f0805892e2";

function openWin(url,title,width,height) {
    var win_left = (window_width - width) / 2;
    var win_top = (window_height - height) / 2;
    attrib = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left='+win_left+',top='+win_top+',width='+width+',height='+height+',bgcolor=#000000';
    wref = window.open(url,title,attrib);
}

function popupClip(clipName,clipPid,isLow,lang) {
    var curURL = clipBaseUrl + "?" + "language=" + lang;
    if(isLow) {
        isLow = "_lowb";
    } else {
        isLow = "";
    }
    curURL += "&loadmodule=" + clipName + isLow;
    curURL += "&pid=" + clipPid;
    curURL += "&id=" + clipOwnerID;
    var curTitle = "_blank";
    var curWidth = 640;
    var curHeight = 560;
    openWin(curURL,curTitle,curWidth,curHeight);
}
