function facebook(u){var url='http://www.facebook.com/share.php?u='+encodeURIComponent(u);window.open(url);}
function plurk(u){var titles=document.getElementsByTagName('title');var title=titles[0].innerHTML;var metas=document.getElementsByTagName('meta');for(var i=0;i<metas.length;i++){if(metas[i].getAttribute('name')=='title'){title=metas[i].getAttribute('content');break;}}
var url='http://www.plurk.com/?qualifier=shares&status=';url+=encodeURIComponent(u)+' '+encodeURIComponent('('+title+')');window.open(url);}

function DrawImage(ImgD,iwidth,iheight){
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
        if(image.width/image.height>= iwidth/iheight){
            if(image.width>iwidth){ 
                ImgD.width=iwidth;
                ImgD.height=(image.height*iwidth)/image.width;
            }else{
                ImgD.width=image.width; 
                ImgD.height=image.height;
            }
        }
        else{
            if(image.height>iheight){ 
                ImgD.height=iheight;
                ImgD.width=(image.width*iheight)/image.height; 
            }else{
                ImgD.width=image.width;
                ImgD.height=image.height;
            }
        }
    }
}

function SelectedValues2(formx){
     var values="";
     var getChkboxs=document.getElementsByName("chkboxs");
	for (var i=0;i<getChkboxs.length;i++){

	   if (getChkboxs[i].checked){
	        values+="<>"+getChkboxs[i].value;
	   }
	}

formx.checkbox_to_delete.value=values;
//alert(formx.checkbox_to_delete.value);

}
