
function showWin(_url, _width, _height, _scroll) {

    if (_scroll == 1) {
	    win2 = window.open(_url, "", "dependant=1,resizable=1,height="+_height+",width="+_width+",scrollbars");
	} else {
	    win2 = window.open(_url, "", "dependant=1,resizable=1,height="+_height+",width="+_width);
	}

	win2.resizeTo(_width,_height);

	return false;
}

var gWin;

function showWinPF(_url, _width, _height, _scroll) {

   if ( gWin ) {
       if ( ! gWin.closed ) gWin.close();
   }

   posX = (screen.width - _width) / 2;
   posY = (screen.height - _height) / 2;

   gWin = window.open(_url ,'fotos','resizable=0,width='+_width+',height='+_height+',scrollbars='+_scroll+',status=0,left='+posX+',top='+posY);

   return false;



//	win2.resizeTo(_width,_height);

}



function showPaymentWin(_url) {
   posX = (screen.width - 550) / 2;                                                                                                                             
   posY = (screen.height - 530) / 2;                                                                                                                            
                                                                                                                                                                
                                                                                                                                                                
   var height = screen.height;                                                                                                                                  
   var width  = screen.width;                                                                                                                                   
                                                                                                                                                                
                                                                                                                                                                
                                                                                                                                                                
     win2 = window.open(_url, "", "menubar,dependant=1,resizable=1,height="+ height +",width="+ width +",scrollbars,status,left="+posX+',top='+posY);           
                                              



	return false;
}

var conWin;
function contact( pUrl) {

   if ( conWin ) {
       if ( ! conWin.closed ) conWin.close();
   }


   posX = (screen.width - 480) / 2;
   posY = (screen.height - 500) / 2;
    
	conWin = window.open(pUrl, 'contact', 'width=480,height=500,resizable=0,scrollbars,menubar=no,toolbar=no,left='+posX+',top='+posY);
	return false;
}

var payWin;

function startOrder(pFilmId, pSessId) {
    var orderStart = "ordre_start_gcp.php?PHPSESSID="+pSessId+"&p_filmId=" + pFilmId;

   if ( payWin ) {
       if ( ! payWin.closed ) payWin.close();
   }

   posX = (screen.width - 460) / 2;
   posY = (screen.height - 530) / 2;

    payWin = window.open(orderStart, "", "menubar,dependant=1,resizable=1,height=530,width=460,scrollbars,status,left="+posX+',top='+posY);
   
    return false;
}

function chkPayForm(pForm, pMsg) {
    if ( pForm.expmon.value.length == 2 &&
         pForm.expyear.value.length == 2 &&
         pForm.cardno.value.length > 10 &&
         pForm.cvc.value.length == 3) {
        return true;
    } else {
         alert (pMsg);
        return false;
    }
}

function chkPayFormVxs(pForm, pMsg) {
    if ( pForm.p_expmon.value.length == 2 &&
         pForm.p_expyear.value.length == 2 &&
         pForm.p_cardno.value.length > 10 &&
         pForm.p_cvc.value.length == 3 && 
         pForm.p_email.value.length > 6 &&
         pForm.p_country.selectedIndex > 0 ) {
        return true;
    } else {
        alert (pMsg);
        return false;
    }
}
