
//首页滑动门


function menuSwitch1(itemId){
	for(i = 1;i<4;i++){
		document.getElementById("indextj_"+i).style.display = "none";
		document.getElementById("indexbut_"+i).className="/";
	}
	document.getElementById("indextj_"+itemId).style.display = "block";
	document.getElementById("indexbut_"+itemId).className="nonce";
}




//城市
if (top.location != location) top.location.href = self.location;

var purposeList = new Array(4);

purposeList[0] += "<OPTION VALUE='E'>送花意图</OPTION>";

purposeList[1] += "<OPTION VALUE='祝福'>节日→温馨祝福</OPTION>";
purposeList[1] += "<OPTION VALUE='E'></OPTION>";
purposeList[1] += "<OPTION VALUE='生日'>祝贺→福寿康宁</OPTION>";
purposeList[1] += "<OPTION VALUE='乔迁'>祝贺→乔迁新居</OPTION>";
purposeList[1] += "<OPTION VALUE='婚庆'>祝贺→结婚纪念</OPTION>";
purposeList[1] += "<OPTION VALUE='E'></OPTION>";
purposeList[1] += "<OPTION VALUE='开张'>商务→开张大吉</OPTION>";
purposeList[1] += "<OPTION VALUE='E'></OPTION>";
purposeList[1] += "<OPTION VALUE='道歉'>道歉→恳请原谅</OPTION>";
purposeList[1] += "<OPTION VALUE='探望'>探病→早日康复</OPTION>";
purposeList[1] += "<OPTION VALUE='E'></OPTION>";
purposeList[1] += "<OPTION VALUE='吊唁'>吊唁→沉痛哀悼</OPTION>";

purposeList[2] += "<OPTION VALUE='祝福'>节日→诚挚问候</OPTION>";
purposeList[2] += "<OPTION VALUE='E'></OPTION>";
purposeList[2] += "<OPTION VALUE='生日'>祝贺→生日快乐</OPTION>";
purposeList[2] += "<OPTION VALUE='乔迁'>祝贺→乔迁新居</OPTION>";
purposeList[2] += "<OPTION VALUE='婚庆'>祝贺→婚礼庆典</OPTION>";
purposeList[2] += "<OPTION VALUE='满月'>祝贺→婴儿降生</OPTION>";
purposeList[2] += "<OPTION VALUE='E'></OPTION>";
purposeList[2] += "<OPTION VALUE='开张'>商务→开张大吉</OPTION>";
purposeList[2] += "<OPTION VALUE='E'></OPTION>";
purposeList[2] += "<OPTION VALUE='道歉'>道歉→敬请谅解</OPTION>";
purposeList[2] += "<OPTION VALUE='探望'>探病→早日康复</OPTION>";
purposeList[2] += "<OPTION VALUE='E'></OPTION>";
purposeList[2] += "<OPTION VALUE='吊唁'>吊唁→寄托哀思</OPTION>";

purposeList[3] += "<OPTION VALUE='生日'>祝贺→生日快乐</OPTION>";
purposeList[3] += "<OPTION VALUE='E'></OPTION>";
purposeList[3] += "<OPTION VALUE='表白'>表白→偏偏喜欢你</OPTION>";
purposeList[3] += "<OPTION VALUE='求婚'>誓言→爱你一生一世</OPTION>";
purposeList[3] += "<OPTION VALUE='表白'>求婚→给你幸福</OPTION>";
purposeList[3] += "<OPTION VALUE='恋情'>甜蜜→有你真精彩</OPTION>";
purposeList[3] += "<OPTION VALUE='想念'>思念→真的不能没有你</OPTION>";
purposeList[3] += "<OPTION VALUE='E'></OPTION>";
purposeList[3] += "<OPTION VALUE='道歉'>道歉→情非得以</OPTION>";
purposeList[3] += "<OPTION VALUE='探望'>探病→早日康复</OPTION>";
purposeList[3] += "<OPTION VALUE='E'></OPTION>";
purposeList[3] += "<OPTION VALUE='吊唁'>吊唁→曾经最美</OPTION>";

function formChange() {

	switch (document.s.Recipient.value) {
		case 'E': strPurpose = purposeList[0]; break;
		case 'G': strPurpose = purposeList[1]; break;
		case 'P': strPurpose = purposeList[1]; break;
		case 'S': strPurpose = purposeList[2]; break;
		case 'Y': strPurpose = purposeList[2]; break;
		case 'B': strPurpose = purposeList[1]; break;
		case 'F': strPurpose = purposeList[2]; break;
		case 'C': strPurpose = purposeList[2]; break;
		default : strPurpose = purposeList[3]; break;
	}

	spanPurpose.innerHTML = "<select class=width1 size=1 name=\"Purpose\">" + strPurpose + "</select>";

}

function formCheck() {

	if (document.s.Recipient.value == 'E') {
		document.s.Recipient.focus();
		hVoice.src = "shock.wav";
		return false;
	}

	if (document.s.Purpose.value == 'E') {
		document.s.Purpose.focus();
		hVoice.src = "shock.wav";
		return false;
	}

	if (document.s.AreaCode.value == 0) {
		document.s.AreaCode.focus();
		hVoice.src = "shock.wav";
		return false;
	}

	document.s.submit();
	window.document.body.innerHTML = nowLoading();
	return true;

}

function formReset() {
	document.s.reset(); return false;
}




//各地花店翻屏代码


function Marquee()
{
	this.ID = document.getElementById(arguments[0]);
	this.Direction = arguments[1];
	this.Step = arguments[2];
	this.Width = arguments[3];
	this.Height = arguments[4];
	this.Timer = arguments[5];
	this.WaitTime = arguments[6];
	this.StopTime = arguments[7];
	if(arguments[8])
		this.ScrollStep = arguments[8]
	else
		this.ScrollStep = this.Direction>1 ? this.Width : this.Height;
	this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
	this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
	this.ID.noWrap = true;
	this.ID.style.width = this.Width;
	this.ID.style.height = this.Height;
	this.ClientScroll = this.Direction>1 ? this.ID.scrollWidth : this.ID.scrollHeight;
	this.ID.innerHTML += this.ID.innerHTML;
	this.Start(this,this.Timer,this.WaitTime,this.StopTime);
}


Marquee.prototype.Start = function(msobj,timer,waittime,stoptime)
{
	msobj.StartID = function(){msobj.Scroll()}
	msobj.Continue = function()
				{
					if(msobj.MouseOver == 1)
					{
						setTimeout(msobj.Continue,waittime);
					}
					else
					{	clearInterval(msobj.TimerID);
						msobj.CTL = msobj.Stop = 0;
						msobj.TimerID = setInterval(msobj.StartID,timer);
					}
				}
	msobj.Pause = function()
			{
				msobj.Stop = 1;
				clearInterval(msobj.TimerID);
				setTimeout(msobj.Continue,waittime);
			}
	msobj.Begin = function()
	{
		msobj.TimerID = setInterval(msobj.StartID,timer);
		msobj.ID.onmouseover = function()
					{
						msobj.MouseOver = 1;
						clearInterval(msobj.TimerID);
					}
		msobj.ID.onmouseout = function()
					{
						msobj.MouseOver = 0;
						if(msobj.Stop == 0)
						{
							clearInterval(msobj.TimerID);
							msobj.TimerID = setInterval(msobj.StartID,timer);
						}
					}
	}
	setTimeout(msobj.Begin,stoptime);
}

Marquee.prototype.Scroll = function()
{
	switch(this.Direction)
	{
		case 0:
			this.CTL += this.Step;
			if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
			{
				this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL;
				this.Pause();
				return;
			}
			else
			{   
				if(this.ID.scrollTop >= this.ClientScroll)
				{
					this.ID.scrollTop -= this.ClientScroll;
				}
				this.ID.scrollTop += this.Step;
			}
		break;

		case 1:
			this.CTL += this.Step;
			if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
			{
				this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL;
				this.Pause();
				return;
			}
			else
			{
				if(this.ID.scrollTop <= 0)
				{
					this.ID.scrollTop += this.ClientScroll;
				}
				this.ID.scrollTop -= this.Step;
			}
		break;

		case 2:
			this.CTL += this.Step;
			if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
			{
				this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL;
				this.Pause();
				return;
			}
			else
			{
				if(this.ID.scrollLeft >= this.ClientScroll)
				{
					this.ID.scrollLeft -= this.ClientScroll;
				}
				this.ID.scrollLeft += this.Step;
			}
		break;

		case 3:
			this.CTL += this.Step;
			if(this.CTL >= this.ScrollStep && this.WaitTime > 0)
			{
				this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL;
				this.Pause();
				return;
			}
			else
			{
				if(this.ID.scrollLeft <= 0)
				{
					this.ID.scrollLeft += this.ClientScroll;
				}
				this.ID.scrollLeft -= this.Step;
			}
		break;
	}
}






//首页滑动门


function showFlash(showId,flashSrc,flashW,flashH){
	document.getElementById(showId).innerHTML='<embed src="'+flashSrc+'" height="'+flashH+'" width="'+flashW+'" wmode="transparent" type="application/x-shockwave-flash"></embed>';
}


