﻿$(document).load(function(){basesz();sameh();});
function basesz(){$("a.blank").click(function(){window.open($(this).attr("href"));return false;});$("#gallery img").ImageAutoSize(137,94);}
function height(times){var intervals=setInterval(function(){	clearInterval(intervals);height(8000);},times);sameh();}
function sameh(){
	var aheight=$("#nmainleft").height();
	var bheight=$("#nmainright").height();
if (aheight>bheight){$("#namin").height(aheight);$("#nmainright").height(aheight);}
else{$("#nmainleft").height(bheight);$("#namin").height(bheight);}}


jQuery.fn.ImageAutoSize=function(width,height){$(this).each(function(){var image=$(this);ywidth=image.width();yheight=image.height();if(image.width()>width){image.width(width);image.height(width/ywidth*yheight);}if(yheight>height){image.height(height);image.width(height/yheight*ywidth);}})};jQuery.fn.whSize=function(width){$(this).each(function(){var image=$(this);yheight=image.height();ywidth=image.width();if(ywidth>yheight){image.width(width);image.height(width/ywidth*yheight);}})};jQuery.fn.ImageAutoWidthSize=function(width){$(this).each(function(){var image=$(this);ywidth=image.width();yheight=image.height();if(ywidth>width){image.width(width);image.height(width/ywidth*yheight);}})}

function flash(url,width,height)
{
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='"+width+"' height='"+height+"'><param name='movie' value='"+url+"' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='"+url+"' quality='high' wmode='transparent' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed></object>");	
}