var new1,win1p,win1;
function backopen (img,x,y,bg) {

if (win1p=="on") {
if (new1.closed) {} else {new1.close();}
}
win1p = "on";

new1=window.open("", "photo", "resizable=1,width="+x+",height="+y+",status=no,toolbar=no,location=no,menubar=no,directories=no");
new1.document.clear(); 
new1.document.write("<html><head><meta http-equiv=Content-Type content=\"text/html; charset=x-sjis\"><title>photo</title></head>");
new1.document.write("<style type='text/css'> <!-- p {  margin:0; padding:0; text-align: center;}  --> </style>");
new1.document.write("<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>");
new1.document.write("<p><img src="+img+"></p>");
new1.document.write("<p><a href='javascript:window.close()'><img src='../../../img/close.gif' border='0' alt='close' style='margin-top: 5px;'></a> <p>");
new1.document.write("</body></html>");
new1.document.close(); 

 if(bg==0){
        new1.document.bgColor="#ffffff";
    }else if(bg==1){
       new1. document.bgColor="#000000";
    }else if(bg==2){
       new1. document.bgColor="#d2d6df";
    }

}


