// JavaScript Document
var flag=false;
function DrawImage(ImgD,ImgW,ImgH){
   var image=new Image();
   var ImgW=ImgW;
   var ImgH=ImgH;
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= ImgW/ImgH){
     if(image.width>ImgW){ 
     ImgD.height=(image.height*ImgW)/image.width; 
                                               
     ImgD.width=ImgW;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
    // ImgD.alt=""+image.width+"¡Á"+image.height;
     }
    else{
     if(image.height>ImgH){ 
     ImgD.width=(image.width*ImgH)/image.height; 
     ImgD.height=ImgH;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
   //  ImgD.alt=""+image.width+"¡Á"+image.height;
     }
    }
} 
function ShowDiv(thisDiv,thisHeight,thiswidth,thisMouse) 
{
	thisDiv.style.visibility="visible";
	//args=ShowDiv.arguments;
	//alert(args.length)
	if (thisMouse=="OnClick")
	{
		obj=window.event.srcElement;
		objLeft   = obj.offsetLeft;
		objTop    = obj.offsetTop;
		objParent = obj.offsetParent;
		while (objParent.tagName.toUpperCase() != "BODY")
		{
			objLeft  += objParent.offsetLeft;
			objTop   += objParent.offsetTop;
			objParent = objParent.offsetParent;
		}
		thisDiv.style.left=parseInt((window.screen.width-915)/2)-18;
		//thisDiv.style.left=objLeft+thiswidth;
		thisDiv.style.top=objTop+thisHeight;

	}
}

function HiddenDiv(thisDiv)
{
    thisDiv.style.visibility="hidden";
}


function showHeight()
{
obj=window.event.srcElement;
//alert(obj.height)
}

  function AddFavorite(theURL, theTitle,PicUP)
  {
	 location.href="Member_favorite.aspx?PicUP="+PicUP+"&URl="+theURL+"&BTitle="+theTitle;
//  try
//  {
//  window.external.addFavorite(theURL, theTitle);
//  }
//  catch (e)
//  {
//  try
//  {
//  window.sidebar.addPanel(theTitle, theURL, "");
//  }
//  catch (e)
//  {
//  //alert("¼ÓÈëÊÕ²ØÊ§°Ü!");
//  }
  //}
  }

