function changeMenuSize(height)
{

    $("#menu_left").attr('height',height);
    $("#menuLeft").attr('height',height);

/*    $("#menu_left").hide();    
    $("#menu_left").show();*/
    
    $("#main").attr('height',height);
    $("#main").attr('height','auto');
    
    $("#menuLeft").css('position','relative');
    $("#menuLeft").css('top','0px');
    $("#menuLeft").css('left','0px');
    
   
}
function resizeLeftMenu(height)
{
   /*$("#category_logos_flash").attr('height',(height));
   $("#category_logos").attr('style','height: '+(height)+'px');*/
}

function showShadowbox(url,w,h)
{
  var tmp=new Object();
  tmp.player='iframe';
  tmp.content=url;
  if(w!='default' && w!='') tmp.width=w;
  if(h!='default' && h!='') tmp.height=h;

  Shadowbox.open(tmp);

}

function checkFlash()
{
    var a=$("<a>");
    a.attr('href','http://get.adobe.com/flashplayer');
    a.attr('target','_blank');
    var img=$("<img>");
    img.attr('width',50);
    img.attr('src',"http://wwwimages.adobe.com/www.adobe.com/shockwave/download/images/flashplayer_100x100.jpg");
    a.append(img);
    //a.append($("Install flash player"));

    var ie=false;
    if(navigator.appName=="Microsoft Internet Explorer") ie=true;

        
    var objs=$(".flash_object");
    objs.each(function()
    {
       if(!ie) var tmp=$(this).find("embed");
       else var tmp=$(this).find("object");
        
       if(tmp.attr('id')==undefined)
       {

        $(this).append(a.clone()); //alert("OK"); //alert($(this).find("embed"));
       }
    }) 
    
    
}

function trim11 (str) {
	str = str.replace(/^\s+/, '');
	for (var i = str.length - 1; i >= 0; i--) {
		if (/\S/.test(str.charAt(i))) {
			str = str.substring(0, i + 1);
			break;
		}
	}
	return str;
}

function checkEmail(email)
{
	email=trim11(email);
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	if(!reg.test(email)) return false;
	return true;
}


$("document").ready(function()
{
    setTimeout('checkFlash()',10);
    
    
})


