function adjustImage(){
    inp = document.getElementsByTagName("input");

	for(x=0; x<inp.length; x++){
     if(inp[x].name == "post_msg_id"){
	 
	    layerID = "post_message_" + inp[x].value;
		
        imageBox = document.getElementById(layerID);
		imageBoxWidth = imageBox.style.width.substring(0, 580);
		imageSet = imageBox.getElementsByTagName("img");
		for(i=0;i<imageSet.length;i++){
		 if(parseInt(imageSet[i].width) > 580){
		     imageSet[i].style.width = "550px";
		 }
		}
	 }
	 
	}

}
	


function adjustsigImage(){
    inp = document.getElementsByTagName("input");
	 
	 for(x=0; x<inp.length; x++){
	  if(inp[x].name == "sig_id"){

		  layerID = "sig_" + inp[x].value;
		
		  imageBox = document.getElementById(layerID);
		  imageBoxWidth = imageBox.style.width.substring(0, 580);
		  imageSet = imageBox.getElementsByTagName("img");
		  for(i=0;i<imageSet.length;i++){
		     if(parseInt(imageSet[i].width) > 580){
		          imageSet[i].style.width = "550px";
			 }
			
		  }
	 }
    
    }   
} 

function adjustBlogImage(){

	inp = document.getElementsByTagName("input");

	 for(x=0; x<inp.length; x++){
	  if(inp[x].name == "blog_id"){

		  layerID = "blog_message_" + inp[x].value;
		
		  imageBox = document.getElementById(layerID);
		  imageBoxWidth = imageBox.style.width.substring(0, 530);
		  imageSet = imageBox.getElementsByTagName("img");
		  for(i=0;i<imageSet.length;i++){
		     if(parseInt(imageSet[i].width) > 530){
		          imageSet[i].style.width = "530px";
			 }
			
		  }
	 }
    
    }   
}     

function avatarImage(){
    imageBox = document.getElementById("avataresize");
    imageBoxWidth = imageBox.style.width.substring(0, 170);
    imageSet = imageBox.getElementsByTagName("img");
    for(i=0;i<imageSet.length;i++){
       if(imageSet[i].width > 170){
           imageSet[i].style.width = "150px";
       }
       
    }
} 
  

function adjustpmImage(){
    imageBox = document.getElementById("post_message_");
    imageBoxWidth = imageBox.style.width.substring(0, 375);
    imageSet = imageBox.getElementsByTagName("img");
    for(i=0;i<imageSet.length;i++){
       if(imageSet[i].width > 375){
            imageSet[i].style.width = "375px";
       }
       
    }
}

function sigImage(){
    imageBox = document.getElementById("sigpmresize");
    imageBoxWidth = imageBox.style.width.substring(0, 350);
    imageSet = imageBox.getElementsByTagName("img");
    for(i=0;i<imageSet.length;i++){
       if(imageSet[i].width > 350){
           imageSet[i].style.width = "320px";
       }
       
    }
}   

