function openevent(){
	if (navigator.userAgent.indexOf("SV1") == -1 && navigator.userAgent.indexOf("7.0") == -1) {
  		nwin = window.open('http://www.star-j.com/event.asp','eventwin','scrollbars=yes,resizable=yes,width=1210,height=603');
  		//nwin.moveTo(30,30);
		//36px +
  		nwin.focus();
 	 }else{
	
	wOBJ = window.createPopup();
	popOBJ = wOBJ.document.body;
	
	popOBJ.document.body.style.backgroundColor = "#FFFFFF";
	popOBJ.innerHTML = "<br><div ><center><img src='./image_pop/starj_top.jpg'</center></div>";		
	popOBJ.document.body.style.overflowY = "AUTO";
	popOBJ.style.border = "solid blue 2px";
	wOBJ.show(30,30,1210,593,document.body);
	
	}
}
function popup(filename, width, height, windowname, alt){

  if(width > screen.width){
    height = height * screen.width / width;
    width = screen.width;
  }else if(height > screen.height){
    width = width * screen.height / height;
    height = screen.height;
  }

  windowheight = height +28;

  var win=window.open("", windowname, "width=" + width + ",height=" + windowheight);

  win.document.open("text/html");
  win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
  win.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">');
  win.document.write('<head><meta http-equiv="content-language" content="ja" />');
  win.document.write('<title>' + alt + '</title></head>');
  win.document.write('<body style="margin:0px;">');
  win.document.write('<img src="' + filename + '" border="0" width="' + width + '" height="' + height + '" alt="' + alt + '" />');
  win.document.write('<div style="height:3px; margin:0px; font-size:1px;"><img src="../images/spacer.gif border="0" width="1" height="1" alt="" /></div>');
  win.document.write('<div style="height:25px; margin:0px; text-align:center; vertical-align:middle;"><input type="button" value="[X]CLOSE" onclick="javascript:window.close();" /></div>');
  win.document.write('</body></html>');
  win.document.close();


  if(navigator.userAgent.indexOf("Mac")!=-1){
    windowheight += 35;
    win.resizeTo(width, windowheight);
  }
}

function popup_index(filename, width, height, windowname, alt){

  if(width > screen.width){
    height = height * screen.width / width;
    width = screen.width;
  }else if(height > screen.height){
    width = width * screen.height / height;
    height = screen.height;
  }

if (navigator.userAgent.indexOf("SV1") == -1 && navigator.userAgent.indexOf("7.0") == -1 && navigator.userAgent.indexOf("8.0") == -1) {

	  windowheight = parseInt(height) +28;

 	 var win=window.open("", windowname, "width=" + width + ",height=" + windowheight);

  	 win.document.open("text/html");
 	 win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
 	 win.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">');
	 win.document.write('<head><meta http-equiv="content-language" content="ja" />');
  	 win.document.write('<title>' + alt + '</title></head>');
  	 win.document.write('<body style="margin:0px;">');
  	 win.document.write('<img src="' + filename + '" border="0" width="' + width + '" height="' + height + '" alt="' + alt + '" />');
  	 win.document.write('<div style="height:3px; margin:0px; font-size:1px;"><img src="../img/spacer.gif border="0" width="1" height="1" alt="" /></div>');
  	 win.document.write('<div style="height:25px; margin:0px; text-align:center; vertical-align:middle;"><input type="button" value="[X]CLOSE" onclick="javascript:window.close();" /></div>');
  	 win.document.write('</body></html>');
  	 win.document.close();


  	if(navigator.userAgent.indexOf("Mac")!=-1){
    	windowheight += 35;
    	win.resizeTo(width, windowheight);
  	}
	
}else{
	
	wOBJ = window.createPopup();
	popOBJ = wOBJ.document.body;
	
	popOBJ.document.body.style.backgroundColor = "white";
	popOBJ.innerHTML = "<center><img src='" + filename + "'></center>";		
	popOBJ.document.body.style.overflowY = "AUTO";
	popOBJ.style.border = "solid blue 2px";
	wOBJ.show(30,30,width,parseInt(height)+20,document.body);
	
}

	
}

