function getContentMovie(url, type, curPage, element ) {
        var url=url;
        url = url.concat("?_debug=off");

	if ( type == "trailer" ) {
		url = url.concat("&ajaxTrailer=1");
        	url = url.concat("&tpage="+curPage);
	} else {
                url = url.concat("&ajaxMovie=1");
                url = url.concat("&mpage="+curPage);
	}

        url = url.concat("&type="+type);

        var ra0 = new Date().getTime();
        url = url.concat("&r="+ra0);

        var updaterAjax = new Ajax.Updater(
                {success: element},
                url,
                {
                        method: 'get'
                }
        );

        function reportError(request) {
                alert("error");
        }
        return;
}




function openWin(url, width, height) {
	var popUp = window.open(url,'popUp','width='+width+', height='+height+', menubar=no, toolbar=no, location=no, status=no, dependent=yes');
	popUp.focus();
}


function supersizeWin(path, name) {
        screenWidth = screen.availWidth;
        screenHeight = screen.availHeight;

        browser=navigator.userAgent;
        if ((browser.indexOf("MSIE")!=-1)) {
                width = screenWidth - 12;
                height = screenHeight - 100;
        } else {
                width = screenWidth - 12;
                height = screenHeight - 60;
        }

        if (path.match(/supervideo/)) {
                if (screenWidth < 1024 || screenHeight < 768) {
                        width = screenWidth;
                        height = screenHeight;
                }
                width = screenWidth;
                height = screenHeight;
                window.open(path+"?width="+width+"&height="+height,"Supersize","width=" + width + ",height=" + height + ",left=0,top=0,location=no,menubar=noscrollbars=auto,status=no,toolbar=no,resizable=yes");
        } else {
                if (screenWidth < 1280 || screenHeight < 1024) {
//                      return open_win(path.replace(/,supersize,/, ',imgpopup,'), name, 'width=450,height=550');
                }
                window.open(path+"?width="+width+"&height="+height,"Supersize","width=" + width + ",height=" + height + ",left=0,top=0,location=no,menubar=noscrollbars=auto,status=no,toolbar=no,resizable=yes");

        }
        
}



function pOpen(URL) {
        var width = Math.min(900, screen.availWidth);
        var height = Math.min(800, screen.availHeight);
        var popUp = window.open(URL,'popUp','width='+width+', height='+height+', menubar=no, locationbar=yes, location=yes, toolbar=yes, status=no, dependent=yes, scrollbars=yes');
        popUp.focus();
}

