
	function slideThumbChange(point,i){
		$('.selectedSlide').removeClass('selectedSlide');
		$('#slideThumb'+point).addClass('selectedSlide');
			if($('#slideImagePlayer').html()=='' || point!=0){
				$('#slideImagePlayer').html('<img src="http://www.mucai.org/'+slidePathArray[i].replace('{size}','_360')+'">');
		}
	}
    
    
	String.prototype.Trim = function() 
    { 
    return this.replace(/(^\s*)|(\s*$)/g, ""); 
    } 
     
    String.prototype.LTrim = function() 
    { 
    return this.replace(/(^\s*)/g, ""); 
    } 
     
    String.prototype.RTrim = function() 
    { 
    return this.replace(/(\s*$)/g, ""); 
    } 

function openWin(url,w,h){
	window.open(url, '_blank', config='height='+h+',width='+w)
}
function postToSina(){
openWin('http://v.t.sina.com.cn/share/share.php?url='+window.location.href+'&title='+window.title+'&source=&sourceUrl='+window.loaction.href, 600, 490);
}

function postToQQ(){
openWin('http://v.t.qq.com/share/share.php?title='+window.title+'&url='+window.location.href+'&source='+window.location.href+'&site=&pic=', 670, 670);
}

function postToKai(){
openWin('http://www.kaixin001.com/repaste/share.php?rtitle='+window.title+'&rurl='+window.location.href+'&rcontent=', 600, 360);
}
function postToRen(){
openWin('http://share.renren.com/share/buttonshare.do?link='+window.location.href+'&title='+window.title, 600, 360);
}

function postToSohu(){
	openWin('http://bai.sohu.com/appLogin.jsp?border=1&bru=/share/blank/add.do?link='+window.location.href, 970, 370);
}

function postToDouban(){
	openWin('http://www.douban.com/recommend/?url='+window.location.href+'&title='+window.location.href, 450, 355);
}

function postToQzone(){
	openWin('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+window.location.href, 920, 530);
}

function valiForm(f,required,alertMsg){
    if(required.indexOf(',')!=-1){
        var s = required.split(',');
        if(s.length>0){
            for(var i=0;i<s.length;i++){
                var c=eval('f.'+s[i]);
                if(c.value==undefined || c.value.Trim() == ''){
                    alert(alertMsg);
                    c.focus();
                    return false;
                }
            }
        }
    }else{
        var c = eval("f."+required);
        if(c.value==undefined || c.value.Trim()==''){
            alert(alertMsg);
            c.focus();
            return false;
        }
    }
    return true;
}

