﻿var bgImages = [];
var textCopies = [];
var href = [];

bgImages[0] = "skins/model_ibosh/images/how_it_works.jpg";
bgImages[1] = "skins/model_ibosh/images/what_can_i_learn.jpg";
bgImages[2] = "skins/model_ibosh/images/support_package.jpg";
bgImages[3] = "skins/model_ibosh/images/your_profile.jpg";
	
textCopies[0] = "<strong>一、 </strong> 树立公司形象，扩大业务宣传；<br><strong>二、 </strong> 收集客户反馈，加强客户服务；<br><strong>三、 </strong>网上市场调查，开展网络营销； <br><strong>四、 </strong> 建立信息数据库，实施电子商务..... ";
textCopies[1] = "团队优秀的设计师为您提供国内数套知名程序模板设计，其中包括动易CMS、帝国CMS、织梦CMS、PHP168CMS、动网BBS、Discuz、深喉咙CMS、ShopEx、Oblog等一系列知名程序";
textCopies[2] = "IT外包服务<strong> (IT Outsourcing)  </strong>现代企业将IT部门的职能外包，集中精力发展企业的核心业务，从而达到降低成本、提高效率、充分发挥自身核心竞争力，免去加设IT部门或网络维护人员的支出，花更少的钱，做更多的事...";
textCopies[3] = "市场营销是为创造实现个人和组织的交易，而规划和实施创意、产品、服务构想、定价、促销和分销的过程。而网络营销是人类经济、科技、文化发展的必然产物，他不受时间和空间限制，在很大程度上改变了传统营销形态和业态...";
	
href[0] = "http://www.zhite.net/?p=2";
href[1] = "http://www.zhite.net/?p=2";
href[2] = "http://www.zhite.net/?p=2";
href[3] = "http://www.zhite.net/?p=2";

function showTab(intI){
	document.getElementById("read_more").href = href[intI];
	document.getElementById("headerZone").style.background = "url(" + bgImages[intI] + ")";
	document.getElementById("headerText").innerHTML = textCopies[intI];
}

function trim(text){
	text = text.replace(/^\s+/, "");
	text = text.replace(/\s+$/, "");
	text = text.replace(/\s+/g, " ");
	return text;
}

function checkSendFeedback(){		

	var objForm = document.getElementById("frmEnquiry");
	
	if (trim(objForm.name.value).length < 2){
		alert("Please enter your name.");
		objForm.name.value = trim(objForm.name.value);
		objForm.name.focus();
		return false;
	}
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.llmhgyt.value)))){
		alert("Please enter a valid email address for yourself.");
		objForm.llmhgyt.value = trim(objForm.llmhgyt.value);
		objForm.llmhgyt.focus();
		return false;
	}
	
	if (trim(objForm.number.value).length < 2){
		alert("Please enter your contact number.");
		objForm.number.value = trim(objForm.number.value);
		objForm.number.focus();
		return false;
	}
	
	return true;
	
}
