function addoptions(optid,classn) {
	optobj = document.getElementById('optid'+optid);
	if(optobj.getElementsByTagName('input')[0].checked){
		optobj.className="optlistsed";
		inshtml = optobj.getElementsByTagName('h4')[0].getElementsByTagName('span')[0].innerHTML;
		inshtml = '<input value="'+inshtml+'" type="checkbox" checked="checked" onclick="celoptions(\''+optid+'\')" name="AddOptions[]" />'+inshtml;
		if(document.getElementById('optformlist')){
			listteam = document.getElementById('optformlist').getElementsByTagName('li');
			listlong = listteam.length;
			y=document.createElement("li");
			y.title = optid;
			y.className = classn;
			y.innerHTML=inshtml;
			var bfnode = false;
			for(i=listlong-1;i>=0;i--){
				if(parseInt(listteam[i].title)>parseInt(optid)) bfnode = listteam[i];
			}
			if(bfnode) document.getElementById('optformlist').insertBefore(y,bfnode);
			else document.getElementById('optformlist').appendChild(y);
		}
	}else{
		optobj.className="optlist";
		if(document.getElementById('optformlist')){
			listteam = document.getElementById('optformlist').getElementsByTagName('li');
			listlong = listteam.length;
			var delnode = false;
			for(i=0;i<listlong;i++){
				if(listteam[i].title==optid) delnode = listteam[i];
			}
			if(delnode)document.getElementById('optformlist').removeChild(delnode);
		}
	}
}
function celoptions(optid){
	optobj = document.getElementById('optid'+optid);
	if(optobj.getElementsByTagName('input')[0]){
		optobj.getElementsByTagName('input')[0].checked = false;
		optobj.className="optlist";
		if(document.getElementById('optformlist')){
			listteam = document.getElementById('optformlist').getElementsByTagName('li');
			listlong = listteam.length;
			var delnode = false;
			for(i=0;i<listlong;i++){
				if(listteam[i].title==optid) delnode = listteam[i];
			}
			if(delnode)document.getElementById('optformlist').removeChild(delnode);
		}
	}
}
function requiredboxf(dqobj){
	dqobj.style.backgroundColor="#ffffff";
	dqobj.style.borderColor="#7F9DB9";
}
function requiredboxc(dqobj) {
	if(dqobj.value==""){
		dqobj.style.backgroundColor="#ffcccc";
		dqobj.style.borderColor="#ff7a7a";
	}
}
var domsildeshow = new function(){
	function id(x) {
		if (typeof x == "string") return document.getElementById(x);
		return x;
	}
	this.ready = function(tltime,hdtime,autoplay,ztobj){
		var listobj = arguments[4];
		var contobj = new Array();
		var tmplength,tmpi,sum;
		var txtime = hdtime*100;
		var delay = tltime*1000+txtime*10;
		var currw = 1;
		var oldw = 0;
		var jsq = 0;
		var interval,timeout;
		ztobj = id(ztobj);
		var tmpobj = ztobj.getElementsByTagName('div');
		tmplength = tmpobj.length;
		tmpi = 0;		
		for(i=0;i<tmplength;i++){
			if(tmpobj[i].parentNode==ztobj){
				contobj[tmpi] = tmpobj[i];
				tmpi++;
			}
		}
		var laysz = tmpi+1;
		var sum = tmpi;
		for(i=0;i<laysz-1;i++){
			contobj[i].style.zIndex = 0;
		}		
		contobj[0].style.zIndex = laysz;
		var playss = function(s){
			return function(){
				if(jsq==0){
					for(i=0;i<laysz-1;i++){
						contobj[i].style.zIndex = 0;
					}
					if(typeof(listobj)!="undefined"){
						for(c=0;c<sum;c++){listbtnobj[c].className='';};
						listbtnobj[s].className="curr";
					}
					contobj[s].style.zIndex = laysz;
					contobj[oldw].style.zIndex = laysz-1;
					oldw = s;
					currw = s+1;
					if(currw>(sum-1)){
						currw=0;
					}
				}
				if(jsq<txtime){
					contobj[s].style.opacity = jsq/txtime;
					contobj[s].style.filter = "alpha(opacity="+(jsq/txtime*100)+")";
					jsq++;
				}else{
					clearInterval(interval);					
					contobj[s].style.opacity = "1";
					contobj[s].style.filter = "alpha(opacity=100)";
					jsq = 0;						
				}
			}
		}
		function autostart(){			
			clearTimeout(interval);
			clearTimeout(timeout);
			interval = setInterval(playss(currw),10);
			timeout = setTimeout(autostart,delay);					
		}
		if(autoplay){timeout = setTimeout(autostart,delay);};
		if(typeof(listobj)!="undefined"){
			listobj = id(listobj);
			listbtnobj = listobj.getElementsByTagName('li');
			tmplength = listbtnobj.length;
			for(i=0;i<tmplength;i++){
				listbtnobj[i].onmouseover = (function(i){
					return function(){
						clearTimeout(timeout);
						clearInterval(interval);
						if(i!=oldw){
							jsq = 0;
							interval = setInterval(playss(i),10);
						}
						this.onmouseout=function(){
							if(autoplay){
								clearInterval(interval);
								contobj[oldw].style.opacity = "1";
								contobj[oldw].style.filter = "alpha(opacity=100)";
								jsq = 0;
								timeout = setTimeout(autostart,delay);
							}
						}
					}
				})(i)
			}
		}
	}
}

function choice(obj)
{
	obj.style.background="#F3F3F3";
}
function cancel(obj2)
{
	obj2.style.background="#FFFFFF";
}
function showf(obj)
{
  
  var _div1=document.getElementById("family");
  var _div2=document.getElementById("seniors");
  var _div3=document.getElementById("romance");
  var _div4=document.getElementById("s");
  var _div5=document.getElementById("r");
  obj.style.background="url(img/menu_bgon.gif)";
  _div4.style.background="url(img/menu_bg.gif)";
  _div5.style.background="url(img/menu_bg.gif)";
  obj.style.color="#000000";
  _div4.style.color="#0404BB";
  _div5.style.color="#0404BB";
  _div1.style.display="block";
  _div2.style.display="none";
  _div3.style.display="none";
  
}
function shows(obj)
{
  
  var _div1=document.getElementById("seniors");
  var _div2=document.getElementById("family");
  var _div3=document.getElementById("romance");
  var _div4=document.getElementById("f");
  var _div5=document.getElementById("r");
  obj.style.background="url(img/menu_bgon.gif)";
  _div4.style.background="url(img/menu_bg.gif)";
  _div5.style.background="url(img/menu_bg.gif)";
  obj.style.color="#000000";
  _div4.style.color="#0404BB";
  _div5.style.color="#0404BB";
  _div1.style.display="block";
  _div2.style.display="none";
  _div3.style.display="none";
  
}
function showr(obj)
{
  
  var _div1=document.getElementById("romance");
  var _div2=document.getElementById("family");
  var _div3=document.getElementById("seniors");
  var _div4=document.getElementById("f");
  var _div5=document.getElementById("s");
  obj.style.background="url(img/menu_bgon.gif)";
  _div4.style.background="url(img/menu_bg.gif)";
  _div5.style.background="url(img/menu_bg.gif)";
  obj.style.color="#000000";
  _div4.style.color="#0404BB";
  _div5.style.color="#0404BB";
  _div1.style.display="block";
  _div2.style.display="none";
  _div3.style.display="none";
  
}

function moveon(obj)
{
	obj.src="img/tailor_made_button2.png";

}
function movego(obj2)
{
	obj2.src="img/tailor_made_button.png";

}
function customize_tour(obj)
{
	obj.src="img/made_button2.png";
}
function customize(obj2)
{
	obj2.src="img/made_button.png";
}
function mouse_on(obj)
{
  obj.style.background="#F3F3F3";	
}
function mouse_out(obj2)
{
  obj2.style.background="#FDF9F6";
}
function on(obj)
{
	obj.style.background="url(img/button2.gif)";
	
}
function move(obj2)
{
	obj2.style.background="url(img/button.gif)";
	
}
function mouse_on(obj)
{
	obj.style.background="#F3F3F3";	
}
function mouse_out(obj2)
{
	obj2.style.background="#FDF9F6";
}
function setcolor(obj,id)
{
	//var img=document.getElementById(name);
	//img.src="img/enquiry_now.jpg";
	obj.style.background="#ECEEF3";
	

	//_id.style.background-position="0 -20px";
	
}
function returnset(obj2,id2)
{	
	//var img2=document.getElementById(name2);
	//img2.src="img/enquiry.jpg";
	obj2.style.background="#FFFFFF";
}
