/**
*switch banner
*@param param1 string parent div's id
*@param param2 string now div's id
*@param param3 string bannaner's class
*@param param3 string content div's id 
*/
function switchBanner(param1,param2,param3,param4){
	$('#'+param1+' > span').removeClass(param3);
	$('#'+param2).addClass(param3);
	$('div[id^="model"]').each(function(index){
		$(this).hide();
	});
//	$('#Nokia').hide();
//	$('#Sam').hide();
//	$('#Sony').hide();
//	$('#Lenovo').hide();
//	$('#Htc').hide();
//	$('#Dopod').hide();
//	$('#Moto').hide();
//	$('#Panasonic').hide();
	$('#'+param4).show();
}

function changeSearchTitle(param1,param2){
	$('#'+param1).html(param2);
        $('input[name=type]').val(param2);		//add by vance 12.21
	$('#search_select_yet').hide();
}

function switchClass(addId,removeId,divClass,showContentId,hideContentId){
	$('#'+addId).addClass(divClass);
	$('#'+removeId).removeClass(divClass);
	$('#'+showContentId).show();
	$('#'+hideContentId).hide();
	
}

function showContent(id){
	$('#'+id).show();
}

function showContentDiv(id,fid){
	$('#'+id).addClass('contentCanRemove-false');
	$('#'+id).show();
	$('#'+fid).addClass('myzhhov');
}

function hideContentDiv(postion,fid,i){
	if(i==undefined){ 
		$('#'+postion).removeClass('contentCanRemove-false');
	}
	var i =  i == undefined ? 1 :i;
	i--;
	if(i<=0) {
		if(!$('#'+postion).hasClass('contentCanRemove-false')){ 
			$('#'+postion).hide();
			$('#'+fid).removeClass('myzhhov');
		}
		return ;
	}
	setTimeout("hideContentDiv('"+ postion +"','"+ fid +"',"+ i +")",500);
}


			if($("input[name=phonetype]").focus()==true){
				document.onkeydown = function(evt){
					var evt = window.event?window.event:evt;
					if(evt.keyCode==13)
					{
						document.forms["myForm"].submit();
					}
				}

			}
function addBookmark(url, label) {
    if (document.all)
    {
        window.external.addFavorite(url, label);
    }
    else if (window.sidebar)
    {
        window.sidebar.addPanel(label, url, '');
    }
}
document.execCommand("BackgroundImageCache",false,true);
