//Function to jump to another forum
function ForumJump(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}


//Function to open preview post window
function OpenPreviewWindow(targetPage, formName){
	
	now = new Date  
	
	//Open the window first 	
   	openWin('','preview','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=400')
   		
   	//Now submit form to the new window
   	formName.action = targetPage + "?ID=" + now.getTime();	
	formName.target = "preview";
	formName.submit();
}

//'**************************************** 
//'******Image Resize & Player MOD******** 
//'*************-- Start --**************** 
//'***WWF china Http://Www.Oxo.Com.Ru/***** 
//'**************************************** 
//'***********old Code ************ 
//'***********old Code ************      
function WWFchina_ResizeIMG(o){ 
     var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%'; 
     return false; 
} 
//'**************************************** 
//'******Image Resize & Player MOD******** 
//'*************-- End--**************** 
//'***WWF china Http://Www.Oxo.Com.Ru/***** 
//'****************************************


function ReplaceURLvariableHTML(strURLvariable,strURLvalue)
{//ÓÃÓÚHTML
	if (strURLvalue != ""){ 
			var strUrl=document.location.href;
			var strSearch=document.location.search;
			if (strSearch!=""){
				var intNumA=strUrl.indexOf(strURLvariable);
				if(intNumA==-1){strUrl = strUrl+'&'+strURLvariable+'=' + strURLvalue;}
				else{
					var intNumB=strUrl.indexOf('&',intNumA)
					if(intNumB=-1){
						intNumA=intNumA+strURLvariable.length+1
						var strTmp = 'SK='+strUrl.substr(intNumA,strSearch.length);
						strUrl = strUrl.replace(strTmp,'SK='+strURLvalue);
					}
					else
					{
						intNumA=intNumA+strURLvariable.length+1
						var strTmp = 'SK='+strUrl.substr(intNumA,intNumB);
						strUrl = strUrl.replace(strTmp,'SK='+strURLvalue);
					}
					}
			}
			else{strUrl = document.location.href+'?'+strURLvariable+'='+ strURLvalue;}
	document.location.href=strUrl;
	}
}
