var Loop_instance =0;

function alternateBorderColor(maxLoop)
{
Loop_instance ++;
var popUpObj = document.getElementById('popUpLayer');

    if(Loop_instance % 2 == 0){

     popUpObj.style.border = "none";
      }else{
        popUpObj.style.border = "none";

        }
    if(Loop_instance<maxLoop){
    ShowPopUp(maxLoop);
    }
}

function ShowPopUp(flickNum){

var popUpObj = document.getElementById('popUpLayer');
popUpObj.style.display="block";
flicktimes =flickNum;

setTimeout('alternateBorderColor(flicktimes);',50)
}
function ClosePopUp(){
var popUpObj = document.getElementById('popUpLayer');
popUpObj.style.display="none";

}

