// JavaScript Document
// Photopopup
function show_photo(id){
	url="/pg/pop_foto.htm?"+id;
		window.open(url, "blank_photo","toolbar=no,width=400,height=480");
}

// Mouseover buttons
if (document.images)
{
	// Webdesign button
	image_webdesign 		 = new Image();
	image_webdesign.src 	 = 'img/buttons/webdesign.png';
	image_webdesign_down 	 = new Image();
	image_webdesign_down.src = 'img/buttons/webdesign_down.png';
}

// Resize images
function resize(curImage, image_resize_width){
   if(!curImage){
	  var curImage = window.event.srcElement;
   }
   width = curImage.width;
   height = curImage.height;
   if( width > image_resize_width ){

	  curImage.width  = image_resize_width;
	  curImage.height = Math.ceil( image_resize_width * ( height / width ) );
   }
}

function check_images(image_resize_width){
	count = document.images.length;
	i = 0;

	while(count>i){
		url = document.images[i].src;
		
		if(document.images[i].complete)
		{
			resize(document.images[i], image_resize_width);
		}
		else
		{
			document.images[i].onload = resize;
		}
		i++;
	}
}


