
toggleAccordionTab = function(){
	var page = $.jqURL.get('page');
	var cpage = $.jqURL.get('cpage');
	if($.browser.msie) $('#content_leftmenu_box div').css('zoom', '1');
	
	//home
	if(cpage){
		$('#content_leftmenu_box').accordion( 'activate' , 0); 
	}
	if(page){
		switch(page){
			case "login":
			case "register":
			case "mem":
				$('#content_leftmenu_box').accordion( 'activate', 3); 
				break;
			case "proddtl":
			case "product":
				$('#content_leftmenu_box').accordion( 'activate', 2); 
				break;
			case "news":
			case "event":
				$('#content_leftmenu_box').accordion( 'activate', 1); 
				break;
		}
	}
	
	if(!cpage && !page)
		$('#content_leftmenu_box').accordion( 'activate' , 0); 
}

setHeight = function(){
    //set footer margin
        if($("div.footer").length){
            wraper_height = $("div.content_wrapper").height();
            body_height = $("div.body").height();
            max_height = (body_height > wraper_height) ? body_height:wraper_height;
            if(max_height) $("div.body").height(max_height+160);
        }
    
    //set banner height if there is banner
    if($("div.box_banner").length){
        if($("div.box_banner").height() < 50 ){ $("div.box_banner").height(50); }
    }
}


searchField = function(){
    if($("input#pubsrcbox").length){
        $("input#pubsrcbox")
            .focus(function(){
                var srcFldVal = $("input#pubsrcbox").val();
                if(srcFldVal=="Enter keyword"){
                    $("input#pubsrcbox").val("");
                }
            })
            .blur(function(){
                var srcFldVal = $("input#pubsrcbox").val();
                if(srcFldVal.length == 0){
                    $("input#pubsrcbox").val("Enter keyword");
                }
            });
    }
}


