﻿String.prototype.replaceAll  = function(s1,s2){
	return this.replace(new RegExp(s1,"gm"),s2);    
}

function resizeimg(ImgD,iwidth,iheight) {
     var image=new Image();
     image.src=ImgD.src;
     if(image.width>0 && image.height>0){
        if(image.width/image.height>= iwidth/iheight){
           if(image.width>iwidth){
               ImgD.width=iwidth;
               ImgD.height=(image.height*iwidth)/image.width;
           }else{
                  ImgD.width=image.width;
                  ImgD.height=image.height;
                }
               ImgD.alt=image.width+"×"+image.height;
        }
        else{
                if(image.height>iheight){
                       ImgD.height=iheight;
                       ImgD.width=(image.width*iheight)/image.height;
                }else{
                        ImgD.width=image.width;
                        ImgD.height=image.height;
                     }
                ImgD.alt=image.width+"×"+image.height;
            }
　　　　　ImgD.style.cursor= "pointer"; //改变鼠标指针
　　　　　//ImgD.onclick = function() { window.open(this.src);} //点击打开大图片
　　　　if (navigator.userAgent.toLowerCase().indexOf("ie") > -1) { //判断浏览器，如果是IE
　　　　　}
    }
}

function switchPlay(Url,P_Width,P_Height)
{
    if(Url.indexOf(".")!=-1)
    {
		var swf_width=P_Width;
		var swf_height=P_Height;
        var exTypeArr=Url.split(".");
        var exType=exTypeArr[exTypeArr.length-1].toLowerCase();
        var sfwString=".swf";
		var flvString=".flv";
        var mpString=".mp3,.mp4,.wmv,.avi,.mpeg,.wma";
        var rmString=".rm3,.rmvb";
        if(sfwString.indexOf(exType)!=-1){
            document.writeln("<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-shockwave-flash\" menu=\"true\" play=\"true\" loop=\"true\"><\/embed>");
        }else if(flvString.indexOf(exType)!=-1){
			
			var texts = '';
			var files = Url;
			var config='0:自动播放|1:连续播放|100:默认音量|0:控制栏位置|2:控制栏显示|0x000033:主体颜色|60:主体透明度|0x66ff00:光晕颜色|0xffffff:图标颜色|0xffffff:文字颜色|:logo文字|:logo地址|:结束swf地址'
			document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+ swf_width +"' height='"+ swf_height +"'>");
			document.write("<param name='movie' value='Style/vcastr2.swf'><param name='quality' value='high'>");
			document.write("<param name='menu' value='false'><param name='wmode' value='opaque'><param name='allowFullScreen' value='true' />");
			document.write("<param name='FlashVars' value='vcastr_file="+files+"&vcastr_title="+texts+"&vcastr_config="+config+"'>");
			document.write("<embed src='Style/vcastr2.swf' wmode='opaque' FlashVars='vcastr_file="+files+"&vcastr_title="+texts+"&vcastr_config="+config+"' menu='false' quality='high' width='"+ swf_width +"' height='"+ swf_height +"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"); 
			document.write("</object>");
		}else if(mpString.indexOf(exType)!=-1 || rmString.indexOf(exType)!=-1){
            document.writeln("<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-mplayer2\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>");
        }else if(rmString.indexOf(exType)!=-1){
            document.writeln("<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"audio\/x-pn-realaudio-plugin\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>");
        }else{
        	document.writeln("<embed src=\""+Url+"\" width=\""+swf_width+"\" height=\""+swf_height+"\" type=\"application\/x-mplayer2\" autostart=\"true\" play=\"true\" loop=\"true\" menu=\"true\"><\/embed>");    
			
        }
    }
}

function InputNum()
{
	if ( !(((window.event.keyCode >= 48) && (window.event.keyCode <= 57)) || (window.event.keyCode == 13) || (window.event.keyCode == 45) || (window.event.keyCode == 46)))
	{
	window.event.keyCode = 0 ;
	}
}

function OnlyChinese()
{ 
	if ((window.event.keyCode >=32) && (window.event.keyCode <= 126))
	{
	window.event.keyCode = 0 ;
	} 
}

function Correlative(FormObject,Fields,CType,ErrStr,IsMust)
{
	if (typeof(FormObject)=="undefined"){FormObject = document.all;}
	if (typeof(CType)=="undefined"){CType="OR";}
	if (typeof(ErrStr)=="undefined"){ErrStr="";}
	if (typeof(IsMust)=="undefined"){IsMust=1;}
	var TField = Fields.split("|")
	var z=0;
	for (var i=0;i<TField.length;i++){
		if (IsInput(FormObject,TField[i],"")==false){z++;}
	}
	if (CType=="AND"){
		if (z>0){GetMsg(ErrStr);FormObject[TField[i-z]].focus();return false;}
	}else if (CType=="OR"){
		if (i==z && IsMust==1){GetMsg(ErrStr);FormObject[TField[0]].focus();return false;}	
	}
	FormObject[TField[0]].focus();
	return true;
}

function replace(s, t, u) {
   i = s.indexOf(t);
   r = "";
   if (i == -1) return s;
   r += s.substring(0,i) + u;
   if ( i + t.length < s.length)
     r += replace(s.substring(i + t.length, s.length), t, u);
   return r;
}

function IsNum(CStr,ErrStr,IsMust,LType,Min,Max)
{
	if (typeof(CStr)=="undefined"){CStr="";}
	if (typeof(IsMust)=="undefined"){IsMust=1;}
	if (typeof(ErrStr)=="undefined"){ErrStr="";}
	var tempstr = "1234567890"; 
	var k;
	if (CStr=="" && IsMust==1){
		GetMsg(ErrStr);
		return false;
	}
	for(var i=0;i<CStr.length;i++)
	{
		k = tempstr.indexOf(CStr.charAt(i));
		if  (k == -1)
		{
			GetMsg(ErrStr);
			return false;
		}
	}
	
	if (LType=="=="){
		if (CStr!=Min && CStr!=Max){
			GetMsg(ErrStr);
			return false;
		}
	}else if(LType=="<>"){
		if (CStr<Min || CStr>Max){
			GetMsg(ErrStr);
			return false;
		}
	}else if(LType=="><"){
		if (!(CStr<Min || CStr>Max)){
			GetMsg(ErrStr);
			return false;
		}
	}else{
		return true;	
	}
}

function IsDate(DStr,ErrStr,IsMust)
{
	if (typeof(IsMust)=="undefined"){IsMust=1;}
	if (typeof(ErrStr)=="undefined"){ErrStr="";}
	var re=/^(\d{4})-(\d{1,2})-(\d{1,2})$/
	if (!re.test(DStr)){
		if (IsMust==1 || DStr!=""){
			GetMsg(ErrStr);
			return false;
		}else{
			return true;
		}
	}
	var r=DStr.match(re)
	var d=new Date(r[1],r[2]-1,r[3])
	var isError = d.getFullYear()==r[1] && d.getMonth()==r[2]-1 && d.getDate()==r[3]
	if (ErrStr!="" && isError==false){GetMsg(ErrStr);}
	return isError
}

function StrLen(LStr,ErrStr,IsMust,LType,Min,Max)
{
	if (typeof(LStr)=="undefined"){LStr = ""}
	var LNum = LStr.length;
	if (typeof(IsMust)!="undefined"){if (IsMust==0 && LNum==0){return;}}
	if (typeof(LType)=="undefined" || LType==""){LType="=="}
	if (typeof(Min)=="undefined" || Min==""){Min=0}
	if (typeof(Max)=="undefined" || Max==""){Max=0}

	if (LType=="=="){
		if (LNum!=Min && LNum!=Max){
			GetMsg(ErrStr);
			return false;
		}
	}else if(LType=="<>"){
		if (LNum<Min || LNum>Max){
			GetMsg(ErrStr);
			return false;
		}
	}else if(LType=="><"){
		if (!(LNum<Min || LNum>Max)){
			GetMsg(ErrStr);
			return false;
		}
	}else{
		return LNum;	
	}
}

function IsEmail(FormObject,FieldName,ErrStr,IsMust)
{
	if (typeof(FormObject)=="undefined"){FormObject = document.all;}
	if (typeof(FormObject[FieldName])=="undefined"){return;}	
	if (typeof(IsMust)=="undefined"){IsMust=1}
	var CSObj = FormObject[FieldName];
	var CSValue = CSObj.value;
	var nLen;
	var nCnt1, nCnt2;
	nCnt1=0;
	nCnt2=0;
	nLen = CSValue.length;
	for(var i=0; i<nLen; i++){
		if(CSValue.charAt(i)==' '){return false;}
		if(CSValue.charAt(i)=='\'' || CSValue.charAt(i)=='\"'){return false;}
		if(CSValue.charAt(i)=='<' || CSValue.charAt(i)=='>' ){return false;}
		if(CSValue.charAt(i)=='@'){nCnt1++;}
		if(CSValue.charAt(i)=='.'){nCnt2++;}
	}
	if( nCnt1!=1 || nCnt2<1){
		if (CSValue!="" || IsMust==1){
			GetMsg(ErrStr);
			CSObj.focus();
			return false;		
		}else{
			return true;
		}
	}else{
		return true;
	}
}

function IsChecked(FormObject,FieldName,ErrStr,IsMust)
{
	if (typeof(FormObject)=="undefined"){FormObject = document.all;}
	if (typeof(FormObject[FieldName])=="undefined"){return;}
	if (typeof(IsMust)=="undefined"){IsMust=1;}
	if (typeof(ErrStr)=="undefined"){ErrStr="";}
	
	var CheckedCount = 0;
	if (typeof(FormObject[FieldName].length)=="undefined"){
		if (FormObject[FieldName].checked == true){CheckedCount++;}
	}else{
		for (var t=0;t<FormObject[FieldName].length;t++){
			if (FormObject[FieldName][t].checked == true){CheckedCount++;}
		}
	}
	if (CheckedCount==0 && IsMust==1){
		GetMsg(ErrStr);
	}
	return CheckedCount;
}

function IsInput(FormObject,FieldName,ErrStr,SType,IsMust){
	if (typeof(FormObject)=="undefined"){FormObject = document.all;}
	if (typeof(FormObject[FieldName])=="undefined"){return;}
	if (typeof(ErrStr)=="undefined"){ErrStr="";}
	if (typeof(SType)=="undefined" || SType==""){SType="string";}
	if (typeof(IsMust)=="undefined"){IsMust=1;}
	
	var CSObj = FormObject[FieldName];
	var CSValue = CSObj.value;
	if (SType=="string"){
		if (CSValue=="" && IsMust==1){
			GetMsg(ErrStr);
			CSObj.focus();
			return false;
		}
	}else if(SType=="int"){
		if (IsNum(CSValue,"",IsMust)==false && IsMust==1){
			GetMsg(ErrStr);
			CSObj.focus();
			return false;
		}
	}else if(SType=="date"){
		if (IsDate(CSValue,"",IsMust)==false){
			GetMsg(ErrStr);
			CSObj.focus();
			return false;
		}
	}else if(SType=="array"){
		var CheckedNum = IsChecked(FormObject,FieldName,"")
		if (CheckedNum==0 && IsMust==1){
			GetMsg(ErrStr);
		}
		return CheckedNum;
	}else if(SType=="email"){
		if (IsEmail(FormObject,FieldName,"",IsMust)==false && IsMust==1){
			GetMsg(ErrStr);
			return false;
		}
	}
	return true;
}

function GetMsg(Msg){
	if (typeof(Msg)=="undefined"){Msg="";}
	if (Msg!=""){alert(Msg);}
}

function selectall(FormName,FieldName,Type){
	if (typeof(Type)=="undefined"){
		for(var i=0;i<document[FormName].elements.length;i++){
			var e=document[FormName].elements[i];
			if((e.name).indexOf(FieldName)!=-1) e.checked = document[FormName].select.checked;
		}
	}else if (Type==1){
		for(var i=0;i<document[FormName].elements.length;i++){
			var e=document[FormName].elements[i];
			if((e.name).indexOf(FieldName)!=-1) e.checked = true;
		}		
	}else if (Type==0){
		for(var i=0;i<document[FormName].elements.length;i++){
			var e=document[FormName].elements[i];
			if((e.name).indexOf(FieldName)!=-1) e.checked = !(e.checked);
		}
	}
}

function sure(FormName,FieldName,sort,str)
{
	var k=document[FormName];
	var z=0;
	for (var i=0;i<k.elements.length;i++)
	{
		var s=k.elements[i];
		if (s.checked && s.name==FieldName)z++;
	}
	if (z==0)
	{
		alert("请先选择要"+str+"的记录!")
		return false;
	}else{	
		if (!window.confirm("确定要"+str+"吗?"))
		{
		return false;
		}
		k.Actions.value = sort;
		k.submit();
	}	
}

function OpenWin(FormName,FieldName,Type,Path)
{
	if (typeof(Path)=="undefined" || Path==""){Path="../../";}
	if (typeof(Type)=="undefined" || Type!=1){
		var features = 'dialogWidth:310px;dialogHeight:207px;dialogLeft:380px;dialogTop:200px;directories:no;localtion:no;menubar:no;status=no;toolbar=no;scrollbars=no;help=no;Resizeable=no';
		returnvalue = window.showModalDialog(Path+"Inc/Win.asp?Text="+document[FormName][FieldName].value,"write",features );
		if (returnvalue!=null){
		document[FormName][FieldName].value=returnvalue;
		}
	}else if (Type==1){
		window.open(Path+"Inc/Intro.asp?"+FormName+"","Intro","width=600px,height=390px,top=150px,left=200px,scrollbars=no")
	}
}

function SelColors(FiledName,FormName,PicName,Path)
{
	if (typeof(Path)=="undefined" || Path==""){Path="../../";}
	if (typeof(FormName)=="undefined" || FormName==""){FormName="all";}
	var retval;
	retval = window.showModalDialog(Path+"WebEditor/Dialog/Select_color.htm","SelColor","dialogWidth:290px;dialogHeight:250px;dialogLeft:372px;dialogTop:210px;directories:no;localtion:no;menubar:no;status:no;toolbar:no;scrollbars:yes;Resizeable:no;help:no");
	if (retval!=null){
		document[FormName][FiledName].value = retval;
		if (typeof(PicName)!="undefined" && PicName != ""){
		document[FormName][PicName].style.backgroundColor = retval;
		}
	}
}

function OverColor(obj)
{
	if (typeof(obj)!="undefined")
	{
		if (obj.style.backgroundColor != "#CDD5FC")
		{
			obj.style.backgroundColor = "#CDD5FC";
		}else{
			obj.style.backgroundColor = "";
		}
	}
}


function OutColor(obj)
{
	if (typeof(obj)!="undefined")
	{
		if (obj.style.backgroundColor == "#CDD5FC")
		{
			obj.style.backgroundColor = "#CDD5FC";
		}else{
			obj.style.backgroundColor = "";
		}
	}
}

function TurnValue(obj,Str1,Str2)
{
	if (typeof(obj)!="undefined")
	{
		if (typeof(Str1)=="undefined"){Str1="";}
		if (typeof(Str2)=="undefined"){Str2="";}
		if (obj.value == Str1){obj.value=Str2;}
	}
}


function AddPageFavorite(sURL, sTitle)
{
   try
   {
       window.external.addFavorite(sURL, sTitle);
   }
   catch (e)
   {
       try
       {
           window.sidebar.addPanel(sTitle, sURL, "");
       }
       catch (e)
       {
           alert("加入收藏失败，请使用Ctrl+D进行添加");
       }
   }
}

function formatStringToDoubleDigitFloat(inputString,FloatLenth)
{
	if(inputString==""||typeof(inputString)=="undefined")
	{
		return(0);
	}
	var isLegalNumber = !isNaN(inputString);
	if (isLegalNumber) 
	{
		var re;
		if (FloatLenth == 1)
			re = /\d+\.?\d{0,1}/;
		else if (FloatLenth == 2)
			re = /\d+\.?\d{0,2}/;
		else if (FloatLenth == 3)
			re = /\d+\.?\d{0,3}/;
		else if (FloatLenth == 4)
			re = /\d+\.?\d{0,4}/;
			
		
		//var re = /\d+\.?\d{0,2}/;
		return(parseFloat(re.exec(inputString)));
	}
	else
	{ 
		return(0);
	}
}


function HS_DateAdd(interval,number,date){number=parseInt(number);if(typeof(date)=="string"){var date=new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2])};if(typeof(date)=="object"){var date=date};switch(interval){case "y":return new Date(date.getFullYear()+number,date.getMonth(),date.getDate());break;case "m":return new Date(date.getFullYear(),date.getMonth()+number,checkDate(date.getFullYear(),date.getMonth()+number,date.getDate()));break;case "d":return new Date(date.getFullYear(),date.getMonth(),date.getDate()+number);break;case "w":return new Date(date.getFullYear(),date.getMonth(),7*number+date.getDate());break;};};function checkDate(year,month,date){var enddate=["31","28","31","30","31","30","31","31","30","31","30","31"];var returnDate="";if(year%4==0){enddate[1]="29"};if(date>enddate[month]){returnDate=enddate[month]};else {returnDate=date};return returnDate;};function WeekDay(date){var theDate;if(typeof(date)=="string"){theDate=new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2]);};if(typeof(date)=="object"){theDate=date};return theDate.getDay();};function HS_calender(){var lis="";var style="";style+="<style type='text/css'>";style+=".calender { width:170px; height:160px; font-size:12px; margin-right:14px; background:url(calenderbg.gif) no-repeat right center #fff; border:1px solid #397EAE; padding:1px}";style+=".calender ul {list-style-type:none; margin:0; padding:0;}";style+=".calender .day { background-color:#EDF5FF; height:20px;}";style+=".calender .day li,.calender .date li{ float:left; width:14%; height:20px; line-height:20px; text-align:center}";style+=".calender li a { text-decoration:none; font-family:Tahoma; font-size:11px; color:#333}";style+=".calender li a:hover { color:#f30; text-decoration:underline}";style+=".calender li a.hasArticle {font-weight:bold; color:#f60 !important}";style+=".lastMonthDate, .nextMonthDate {color:#bbb;font-size:11px}";style+=".selectThisYear a, .selectThisMonth a{text-decoration:none; margin:0 2px; color:#000; font-weight:bold}";style+=".calender .LastMonth, .calender .NextMonth{ text-decoration:none; color:#000; font-size:18px; font-weight:bold; line-height:16px;}";style+=".calender .LastMonth { float:left;}";style+=".calender .NextMonth { float:right;}";style+=".calenderBody {clear:both}";style+=".calenderTitle {text-align:center;height:20px; line-height:20px; clear:both}";style+=".today { background-color:#ffffaa;border:1px solid #f60; padding:2px}";style+=".today a { color:#f30; }";style+=".calenderBottom {clear:both; border-top:1px solid #ddd; padding: 3px 0; text-align:left}";style+=".calenderBottom a {text-decoration:none; margin:2px !important; font-weight:bold; color:#000}";style+=".calenderBottom a.closeCalender{float:right}";style+=".closeCalenderBox {float:right; border:1px solid #000; background:#fff; font-size:9px; width:11px; height:11px; line-height:11px; text-align:center;overflow:hidden; font-weight:normal !important}";style+="</style>";var now;if(typeof(arguments[0])=="string"){selectDate=arguments[0].split("-");var year=selectDate[0];var month=parseInt(selectDate[1])-1+"";var date=selectDate[2];now=new Date(year,month,date);};else if(typeof(arguments[0])=="object"){now=arguments[0];};var lastMonthEndDate=HS_DateAdd("d","-1",now.getFullYear()+"-"+now.getMonth()+"-01").getDate();var lastMonthDate=WeekDay(now.getFullYear()+"-"+now.getMonth()+"-01");var thisMonthLastDate=HS_DateAdd("d","-1",now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString ()+"-01");var thisMonthEndDate=thisMonthLastDate.getDate();var thisMonthEndDay=thisMonthLastDate.getDay();var todayObj=new Date();today=todayObj.getFullYear()+"-"+todayObj.getMonth()+"-"+todayObj.getDate();for(i=0;i<lastMonthDate;i++){lis="<li class='lastMonthDate'>"+lastMonthEndDate+"</li>"+lis;lastMonthEndDate--;};for(i=1;i<=thisMonthEndDate;i++){if(today==now.getFullYear()+"-"+now.getMonth()+"-"+i){var todayString=now.getFullYear()+"-"+(parseInt(now.getMonth())+1).toString ()+"-"+i;lis+="<li><a href=javascript:void(0) class='today' onclick='_selectThisDay(this)' title='"+now.getFullYear()+"-"+(parseInt(now.getMonth())+1)+"-"+i+"'>"+i+"</a></li>";};else {lis+="<li><a href=javascript:void(0) onclick='_selectThisDay(this)' title='"+now.getFullYear()+"-"+(parseInt(now.getMonth())+1)+"-"+i+"'>"+i+"</a></li>";};};var j=1;for(i=thisMonthEndDay;i<6;i++){lis+="<li class='nextMonthDate'>"+j+"</li>";j++;};lis+=style;var CalenderTitle="<a href='javascript:void(0)' class='NextMonth' onclick=HS_calender(HS_DateAdd('m',1,'"+now.getFullYear()+"-"+now.getMonth()+"-"+now.getDate()+"'),this) title='Next Month'>&raquo;</a>";CalenderTitle+="<a href='javascript:void(0)' class='LastMonth' onclick=HS_calender(HS_DateAdd('m',-1,'"+now.getFullYear()+"-"+now.getMonth()+"-"+now.getDate()+"'),this) title='Previous Month'>&laquo;</a>";CalenderTitle+="<span class='selectThisYear'><a href='javascript:void(0)' onclick='CalenderselectYear(this)' title='Click here to select other year' >"+now.getFullYear()+"</a></span>年<span class='selectThisMonth'><a href='javascript:void(0)' onclick='CalenderselectMonth(this)' title='Click here to select other month'>"+(parseInt(now.getMonth())+1).toString ()+"</a></span>月";if(arguments.length>1){arguments[1].parentNode.parentNode.getElementsByTagName("ul")[1].innerHTML=lis;arguments[1].parentNode.innerHTML=CalenderTitle;};else {var CalenderBox=style+"<div class='calender'><div class='calenderTitle'>"+CalenderTitle+"</div><div class='calenderBody'><ul class='day'><li>日</li><li>一</li><li>二</li><li>三</li><li>四</li><li>五</li><li>六</li></ul><ul class='date' id='thisMonthDate'>"+lis+"</ul></div><div class='calenderBottom'><a href='javascript:void(0)' class='closeCalender' onclick='closeCalender(this)'>&times;</a><span><span><a href=javascript:void(0) onclick='_selectThisDay(this)' title='"+todayString+"'>Today</a></span></span></div></div>";return CalenderBox;};};function _selectThisDay(d){var boxObj=d.parentNode.parentNode.parentNode.parentNode.parentNode;boxObj.targetObj.value=d.title;boxObj.parentNode.removeChild(boxObj);};function closeCalender(d){var boxObj=d.parentNode.parentNode.parentNode;boxObj.parentNode.removeChild(boxObj);};function CalenderselectYear(obj){var opt="";var thisYear=obj.innerHTML;for(i=1970;i<=2020;i++){if(i==thisYear){opt+="<option value="+i+" selected>"+i+"</option>";};else {opt+="<option value="+i+">"+i+"</option>";};};opt="<select onblur='selectThisYear(this)' onchange='selectThisYear(this)' style='font-size:11px'>"+opt+"</select>";obj.parentNode.innerHTML=opt;};function selectThisYear(obj){HS_calender(obj.value+"-"+obj.parentNode.parentNode.getElementsByTagName("span")[1].getElementsByTagName("a")[0].innerHTML+"-1",obj.parentNode);};function CalenderselectMonth(obj){var opt="";var thisMonth=obj.innerHTML;for(i=1;i<=12;i++){if(i==thisMonth){opt+="<option value="+i+" selected>"+i+"</option>";};else {opt+="<option value="+i+">"+i+"</option>";};};opt="<select onblur='selectThisMonth(this)' onchange='selectThisMonth(this)' style='font-size:11px'>"+opt+"</select>";obj.parentNode.innerHTML=opt;};function selectThisMonth(obj){HS_calender(obj.parentNode.parentNode.getElementsByTagName("span")[0].getElementsByTagName("a")[0].innerHTML+"-"+obj.value+"-1",obj.parentNode);};function HS_setDate(inputObj){var calenderObj=document.createElement("span");calenderObj.innerHTML=HS_calender(new Date());calenderObj.style.position="absolute";calenderObj.targetObj=inputObj;inputObj.parentNode.insertBefore(calenderObj,inputObj.nextSibling);};

