//点击图片，图片边框颜色改变
function pi_changePicBordColor(tableId, flag){
	var tableObj = pp_getObj(tableId);
	if (pp_isIE()) { //IE
		if(flag == 1){   //onMouseOut
			tableObj.borderColor ="#D1D1D1";	
		}else{  //onMouseOver
			tableObj.borderColor ="#747474";
		}
		tableObj.borderCollapse = "collapse";
	} else { // FF or other
		if(flag == 1){   //onMouseOut
			tableObj.style.borderColor ="#D1D1D1";	
		}else{  //onMouseOver
			tableObj.style.borderColor ="#747474";
		}
		
		tableObj.style.borderCollapse = "collapse";
	}
}

//图片边框，表格rgb变色   changePicTableColor
//首页新品展,邦男，女， 个人空间
function pi_changePicTableColor(thisTable, tableId, picId, color, flag) {
	pi_changeTableColor(picId, color, flag);
	var objTable = $(tableId);
	if (flag==2) { // onMouseOver
		thisTable.style.background='rgb(243,243,243)';
		if (pp_isIE()) {
			objTable.border=1;
			objTable.borderColor='#333333'; 
			objTable.borderCollapse = "collapse";
		} else {
			objTable.style.border=1;
			objTable.style.borderColor='#333333'; 
			objTable.style.borderCollapse = "collapse";
		}
	} else { // onMouseOut
		thisTable.style.background='rgb(255,255,255)';
		if (pp_isIE()) {
			objTable.border=2;
			objTable.borderColor='#d9d5cf'; 
			objTable.borderCollapse = "collapse";
		} else {
			objTable.style.border=2;
			objTable.style.borderColor='#d9d5cf'; 
			objTable.style.borderCollapse = "collapse";
		}
	}
}

//图片边框颜色改变
function pi_changeTableColor(picId, color, flag){
	var picObj = $(picId);
	if(flag == 1){   //out
		picObj.style.color ="#666666";
		picObj.style.fontWeight  = "normal";
		picObj.style.lineHeight = "16px";
		picObj.style.fontSize = "12px";
		picObj.style.fontFamily = "宋体";
		picObj.style.textAlign = "center"
	}else{  //放上来
		picObj.style.color = "#000000";
		picObj.style.fontWeight = "bold";
	}
}

//标签背景图片和内容改变1
function pi_changeLabelBackgroundAndContent(parentSpanId, soureceName, pos, sourcePic, targetPic){
	var sourceObj = $(soureceName+pos);
	var parentSpanObj = $(parentSpanId);
	var spanElement = parentSpanObj.getElementsByTagName("SPAN");

	for(var i = 1; i<=spanElement.length; i++){
		
		$(soureceName+i).style.backgroundImage  = "url("+sourcePic+")";
	
		$(soureceName+i+"a").style.color = "#FFFFFF";
		$(parentSpanId+"content"+i).style.display = "none";
	}
	sourceObj.style.backgroundImage  = "url("+targetPic+")";
	$(soureceName+pos+"a").style.color = "#000000";
	$(parentSpanId+"content"+pos).style.display = "";
}


//标签背景图片和内容改变2
//热门邦会，推荐邦会
/*
function pi_changeLabelBackgroundAndContentStyle2(parentSpanId, soureceName, pos, sourcePic, targetPic){
	var sourceObj = $(soureceName+pos);
	var parentSpanObj = $(parentSpanId);
	var spanElement = parentSpanObj.getElementsByTagName("SPAN");

	for(var i = 1; i<=spanElement.length; i++){
		
		$(soureceName+i).style.backgroundImage  = "url("+sourcePic+")";
	
		$(soureceName+i+"a").style.color = "#000000";
		$(parentSpanId+"content"+i).style.display = "none";
	}
	sourceObj.style.backgroundImage  = "url("+targetPic+")";
	$(soureceName+pos+"a").style.color = "#FFFFFF";
	$(parentSpanId+"content"+pos).style.display = "";
}
*/
function pi_changeLabelBackgroundAndContentStyle2(objId1,objId2){
	var obj1 = $(objId1);
	var obj2 = $(objId2);
	obj1.setAttribute("class","on_title");
	obj1.setAttribute("className","on_title");
	obj2.setAttribute("class","");
	obj2.setAttribute("className","");
	
	$(objId1+"_1").style.display = "";
	$(objId2+"_1").style.display = "none";
}

//标签颜色内容改变
//新品展
function pi_changeLabelContentAndFontColor(parentSpanId, currentObj, contentPos){
	var parentSpanObj = $(parentSpanId);
	var hyperlinkElement = parentSpanObj.getElementsByTagName("A");
	
	for(var i = 1; i<=hyperlinkElement.length; i++){
		hyperlinkElement[i-1].style.fontFamily = "宋体";
		hyperlinkElement[i-1].style.fontWeight  = "normal";
		hyperlinkElement[i-1].style.top = "0px";
		hyperlinkElement[i-1].style.color = "#000000";  
		hyperlinkElement[i-1].style.textDecoration = "none";
		hyperlinkElement[i-1].style.fontSize = "12px";
		$(parentSpanId+"content"+i).style.display = "none";
	}

	currentObj.style.fontWeight = "bold";
	currentObj.style.fontFamily = "宋体";
	//currentObj.style.top = "2px"; 
	currentObj.style.textDecoration = "none";
	currentObj.style.fontSize = "12px";
	//currentObj.style.position = "relative";
	$(parentSpanId+"content"+contentPos).style.display = "";
}

function pi_smallToBigPic(currentObj, img, spanId){
	currentObj.src = img;
	var temp = $(spanId).style.display;
	$(spanId).style.display = (temp == "none") ?"" : "none";
}

function pi_userpath(path,user)
{
   return path+"/u/"+user;
}