var btnObj = new Array();
var contentWidthBig = "664px";
var contentWidthSmall = "493px";
var contentWidthSmall2 = "483px";//493-10
var nodeTree = new Array(new Object());
var nodecount = 0;

//set button default status & assign the images of rollover and rollout 
function makeButton(idName, clkAction, imgOverUrl, imgOutUrl, imgDwnUrl, submenu){
	this.imgelem = document.getElementById(idName);
	this.clickStatus = clkAction;//1: clicked on, 0: clicked off
	this.imgOver = imgOverUrl;
	this.imgOut = imgOutUrl;
	this.imgDwn = imgDwnUrl;
	this.name = idName;
	this.submenu = submenu;//false or true 
	return this;
}
//do once when file onload
function btninit(){
	btnObj.push(new makeButton('home', 0, "images/nav_homeOver.jpg", "images/nav_homeOut.jpg", "images/nav_homeDwn.jpg",false));
	btnObj.push(new makeButton('about', 0, "images/nav_aboutOver.jpg", "images/nav_aboutOut.jpg", "images/nav_aboutDwn.jpg",true));
	btnObj.push(new makeButton('products', 0, "images/nav_productOver.jpg", "images/nav_productOut.jpg", "images/nav_productDwn.jpg",true));
	btnObj.push(new makeButton('services', 0, "images/nav_servicesOver.jpg", "images/nav_servicesOut.jpg", "images/nav_servicesDwn.jpg",true));
	btnObj.push(new makeButton('news', 0, "images/nav_newsOver.jpg", "images/nav_newsOut.jpg", "images/nav_newsDwn.jpg",true));
	btnObj.push(new makeButton('testimonials', 0, "images/nav_testimonialsOver.jpg", "images/nav_testimonialsOut.jpg", "images/nav_testimonialsDwn.jpg",false));
	btnObj.push(new makeButton('faq', 0, "images/nav_faqOver.jpg", "images/nav_faqOut.jpg", "images/nav_faqDwn.jpg",false));
	btnObj.push(new makeButton('contact', 0, "images/nav_contactOver.jpg", "images/nav_contactOut.jpg", "images/nav_contactDwn.jpg",false));
	btnObj.push(new makeButton('subnav_about_profile', 0, "images/subnav_profileOver.jpg", "images/subnav_profileOut.jpg", "images/subnav_profileOut.jpg",false));
	btnObj.push(new makeButton('subnav_about_ab', 0, "images/subnav_abOver.jpg", "images/subnav_abOut.jpg", "images/subnav_abOut.jpg",false));
	btnObj.push(new makeButton('subnav_products_emall', 0, "images/subnav_products_emallOver.jpg", "images/subnav_products_emallOut.jpg", "subnav_products_emallOut.jpg",false));
	btnObj.push(new makeButton('subnav_products_skinCare', 0, "images/subnav_products_scOver.jpg", "images/subnav_products_scOut.jpg", "images/subnav_products_scOut.jpg",false));
	btnObj.push(new makeButton('subnav_products_hs', 0, "images/subnav_products_hsOver.jpg", "images/subnav_products_hsOut.jpg", "images/subnav_products_hsOut.jpg",false));
	btnObj.push(new makeButton('subnav_services_cellureenFacials', 0, "images/subnav_services_cfOver.jpg", "images/subnav_services_cfOut.jpg", "images/subnav_services_cfOut.jpg",false));
	btnObj.push(new makeButton('subnav_services_menFacials', 0, "images/subnav_services_menOver.jpg", "images/subnav_services_menOut.jpg", "images/subnav_services_menOut.jpg",false));
	btnObj.push(new makeButton('subnav_services_poh', 0, "images/subnav_services_pinkOver.jpg", "images/subnav_services_pinkOut.jpg", "images/subnav_services_pinkOut.jpg",false));
	btnObj.push(new makeButton('subnav_services_sw', 0, "images/subnav_services_swOver.jpg", "images/subnav_services_swOut.jpg", "images/subnav_services_swOut.jpg",false));
	btnObj.push(new makeButton('subnav_services_bim4', 0, "images/subnav_services_bim4Over.jpg", "images/subnav_services_bim4Out.jpg", "images/subnav_services_bim4Out.jpg",false));
	btnObj.push(new makeButton('subnav_news_events', 0, "images/subnav_news_eventsOver.jpg", "images/subnav_news_eventsOut.jpg", "images/subnav_news_eventsOut.jpg",false));
	btnObj.push(new makeButton('subnav_news_newsletter', 0, "images/subnav_news_enOver.jpg", "images/subnav_news_enOut.jpg", "images/subnav_news_enOut.jpg",false));

}
// set all buttons' status when there is a mouse click
function setBtnClicked(indx){
	for (var i=0; i<btnObj.length; i++){
		if (i != indx){	
			btnObj[i].clickStatus = 0;
			btnObj[i].imgelem.src = btnObj[i].imgOut;			
		}	
	}
	
	btnObj[indx].clickStatus = 1;
	btnObj[indx].imgelem.src = btnObj[indx].imgDwn;	
}
//execute an button action
function btnAction(idName){
	var treeviewId = "treeview_global";
	var contentId = "contentBody";
	var headerId = "contentHeader";
	var browser=navigator.appName;
	
	//scroll the content window back to top most
	document.getElementById(contentId).scrollTop = 0;
	document.getElementById(contentId).style.overflowY = "auto";
	document.getElementById(contentId).style.height = "488px";
	
	//change css settings due to different browser
	document.getElementById(headerId).style.height = "41px";
	document.getElementById(headerId).style.width = "615px";
	document.getElementById("tableContent").style.height = "477px";
	
	//changecss('#contentHeader','height','41px');
	//changecss('#contentHeader','width','615px');
	//changecss('#contentBody','overflow-y','auto');
	//changecss('#contentBody','height','488px');
	changecss('#sg_wrapper','width','646px');	
	//changecss('#tableContent','height','477px');
	if (browser=="Microsoft Internet Explorer"){
		changecss('.subnav','top','157px');
	}
	else{
		changecss('.subnav','top','165px');
	}
	switch(idName){
		case "home":
			setBtnClicked(0);
			offGlobalTreeView(treeviewId, contentId, '680px');
			parseXML('xmlContent.xml','home',headerId,contentId);
			//temporary solution for different spacing issues
			if (browser=="Microsoft Internet Explorer"){
				document.getElementById(contentId).style.overflowY = "hidden";
				//changecss('#contentBody','overflow-y','hidden');
				document.getElementById("columnA").style.top="668px";
				document.getElementById("columnB").style.top="668px";
				document.getElementById("columnC").style.top="668px";
			}
			else{
				document.getElementById("columnA").style.top="680px";
				document.getElementById("columnB").style.top="680px";
				document.getElementById("columnC").style.top="680px";
			}
			break;
		case "about"://About Company
		case "subnav_about_profile":
			setBtnClicked(1);
			showOneTree(treeviewId, "tree_about", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','profile',headerId,contentId);
			showDivBlock("subnav_about", "hidden");
			break;
		case "subnav_about_ab":
		case "advisoryBd_Stefanie":
			setBtnClicked(1);
			showOneTree(treeviewId, "tree_about", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','advisoryBd_Stefanie',headerId,contentId);
			showDivBlock("subnav_about", "hidden");
			break;
		case "advisoryBd_Tiffany":
			setBtnClicked(1);
			showOneTree(treeviewId, "tree_about", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','advisoryBd_Tiffany',headerId,contentId);
			showDivBlock("subnav_about", "hidden");
			break;
		case "stefanie_article1":
			parseXML('xmlContent.xml','stefanie_article1',headerId,contentId);
			break;	
		case "tiffany_article1":
			parseXML('xmlContent.xml','tiffany_article1',headerId,contentId);
			break;	
		case "tiffany_article2":
			parseXML('xmlContent.xml','tiffany_article2',headerId,contentId);
			break;			
		case "products"://Products
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','products',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;
		case "subnav_products_emall":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','e-mall',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;					
		case "subnav_products_skinCare":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 			
			parseXML('xmlContent.xml','skinCare',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;
		case "subnav_products_hs":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','healthSupplement',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;	
		case "subnav_products_essentialCare":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','essentialCare',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;	
		case "subnav_products_pureFreshness":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','pureFreshness',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;																											
		case "subnav_products_cad":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','ageDefying',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;
		case "subnav_products_rae":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','richAntioxidantEssence',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;
		case "subnav_products_porcelainFairness":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','porcelainFairness',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;	
		case "subnav_products_bustBooster":
			setBtnClicked(2);
			showOneTree(treeviewId, "tree_products", contentId, contentWidthSmall2); 
			parseXML('xmlContent.xml','bustBooster',headerId,contentId);
			showDivBlock("subnav_products", "hidden");
			break;
		case "services"://Services						
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','services',headerId,contentId);
			showDivBlock("subnav_services", "hidden");			
			break;
		case "subnav_services_cellureenFacials":	
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','cellureenFacials',headerId,contentId);
			showDivBlock("subnav_services", "hidden");			
			break;	
		case "subnav_services_menFacials":	
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','menFacials',headerId,contentId);
			showDivBlock("subnav_services", "hidden");			
			break;	
		case "subnav_services_poh":	
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','pinkOfHealth',headerId,contentId);
			showDivBlock("subnav_services", "hidden");			
			break;	
		case "subnav_services_sw":	
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','simplyWellness',headerId,contentId);
			showDivBlock("subnav_services", "hidden");			
			break;				
		case "subnav_services_bim4":	
			setBtnClicked(3);
			showOneTree(treeviewId, "tree_services", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','bim4',headerId,contentId);
			createForm_signup('form_BIM4');
			showDivBlock("subnav_services", "hidden");	
			document.getElementById("sg_wrapper").style.width = "483px";
			//changecss('#sg_wrapper','width','483px');	
			break;
		case "subnav_services_bim4_thankyou":
			setBtnClicked(3);
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','bim4_thankyou',headerId,contentId);
			break;																				
		case "news"://news
		case "subnav_news_events":
			setBtnClicked(4);
			showOneTree(treeviewId, "tree_news", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','events',headerId,contentId);
			createForm_tips("form_events");
			showDivBlock("subnav_news", "hidden");	
			break;
		case "subnav_news_events_thankyou":
			setBtnClicked(4);
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','events_thankyou',headerId,contentId);
			break;			
		case "subnav_news_newsletter":
			setBtnClicked(4);
			showOneTree(treeviewId, "tree_news", contentId, contentWidthSmall); 
			parseXML('xmlContent.xml','newsletter',headerId,contentId);
			showDivBlock("subnav_news", "hidden");	
			break;
		case "testimonials":
			setBtnClicked(5);
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','testimonials',headerId,contentId);
			break;	
		case "faq":
			setBtnClicked(6);
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','faq',headerId,contentId);
			break;		
		case "contact":
			setBtnClicked(7);
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','contact',headerId,contentId);
			break;	
		case "sparty":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);			
			parseXML('xmlContent.xml','sparty',headerId,contentId);
			createForm_sparty('form_sparty');
			break;
		case "sparty_thankyou":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','sparty_thankyou',headerId,contentId);
			break;					
		case "consultation":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','consultation',headerId,contentId);
			createForm_consultation('form_consultation');
			break;
		case "consultation_thankyou":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','consultation_thankyou',headerId,contentId);
			break;				
		case "beautyTips":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','beautyTips',headerId,contentId);
			createForm_tips('form_beautyTips');
			break;
		case "beautyTips_thankyou":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','beautyTips_thankyou',headerId,contentId);
			break;				
		case "wellnessTips":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','wellnessTips',headerId,contentId);
			createForm_tips('form_wellnessTips');
			break;
		case "wellnessTips_thankyou":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','wellnessTips_thankyou',headerId,contentId);
			break;									
		case "affiliatePartner":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','affiliatePartner',headerId,contentId);
			break;
		case "howJoinUs":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','howJoinUs',headerId,contentId);
			createForm_howJoinUs('form_howJoinUs');
			break;
		case "howJoinUs_thankyou":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','howJoinUs_thankyou',headerId,contentId);
			break;
		case "whyJoinUs":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, '710px');
			document.getElementById(headerId).style.height = "138px";
			document.getElementById(headerId).style.width = "710px";
			document.getElementById(contentId).style.height = "417px";
			document.getElementById("tableContent").style.height = "417px";

			//changecss('#contentHeader','height','138px');
			//changecss('#contentHeader','width','710px');
			//changecss('#contentBody','height','417px');
			//changecss('#tableContent','height','417px');			
			parseXML('xmlContent.xml','whyJoinUs',headerId,contentId);
			break;			
		case "policy":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','policy',headerId,contentId);
			break;	
		case "sitemap":
			setAllBtnOff();
			offGlobalTreeView(treeviewId, contentId, contentWidthBig);
			parseXML('xmlContent.xml','sitemap',headerId,contentId);
			break;																																																		
		default:	
	}

}
//reset all the buttons to off status
function setAllBtnOff(){
	for (var i=0; i<btnObj.length; i++){	
		if (btnObj[i].clickStatus){
			btnObj[i].clickStatus = 0;
			btnObj[i].imgelem.src = btnObj[i].imgOut;
			return;
		}
	}
}
//execute when mouse rollover a button
function doMouseOver(idName){
	if (!(btnObj[findBtnIndx(idName)].clickStatus) && !(btnObj[findBtnIndx(idName)].submenu) ) {
		MM_swapImage(idName,'',btnObj[findBtnIndx(idName)].imgOver,1);
	}
	if (btnObj[findBtnIndx(idName)].submenu){
		var submenu = "subnav_"+idName;
		var oDiv = document.getElementById(submenu);
		oDiv.style.display = "block";
	}
}
//execute when mouse rollout a button
function doMouseOut(idName){
	if (!(btnObj[findBtnIndx(idName)].clickStatus) && !(btnObj[findBtnIndx(idName)].submenu)) 
		MM_swapImgRestore();
	if (btnObj[findBtnIndx(idName)].submenu){
		var submenu = "subnav_"+idName;
		var oDiv = document.getElementById(submenu);
		oDiv.style.display = "none";
	}	
}
//find the array index of a button
function findBtnIndx(idName){
	for (var i=0; i<btnObj.length; i++){
		if (btnObj[i].name == idName)
			return i;
	}
}
//execute when mouse rollout a submenu button
function dosubmenuMouseOver(idName){
	MM_swapImage(idName,'',btnObj[findBtnIndx(idName)].imgOver,1);
}
//execute when mouse rollout a submenu button
function dosubmenuMouseOut(idName){
	MM_swapImgRestore();
}

//preload Images when body on load
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//load a XML file
function loadXMLDoc(filename){
	var xmlDoc=null;
	if (window.ActiveXObject)
	{// code for IE
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	}
	else if (document.implementation.createDocument)
	{// code for Mozilla, Firefox, Opera, etc.
		xmlDoc=document.implementation.createDocument("","",null);
		
	}
	else
	{
		alert('Your browser cannot handle XML document. Please update your browser!');
	}
	
	if (xmlDoc !=null)	
	{
		xmlDoc.async=false;/*parser will not continue execution of the script before the document is fully loaded.*/
		xmlDoc.load(filename);
		return xmlDoc;
	}else
		return null;
}
/*********************************************************
Purpose: XML file reader
Parameters:filename, XML file name
			pageID, which page content to read
			headerID, the DIV's idname for header display
			contentID, the DIV's idname for content display
*********************************************************/
function parseXML(filename,pageID,headerID,contentID)
{
	var xmlDoc = loadXMLDoc(filename);
	/*var xmlDoc=null;
	if (window.ActiveXObject)
	{// code for IE
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	}
	else if (document.implementation.createDocument)
	{// code for Mozilla, Firefox, Opera, etc.
		xmlDoc=document.implementation.createDocument("","",null);
		
	}
	else
	{
		alert('Your browser cannot handle XML document. Please update your browser!');
	}
	
	if (xmlDoc !=null)	
	{
		xmlDoc.async=false;//parser will not continue execution of the script before the document is fully loaded.
		xmlDoc.load(filename);*/
		//alert(xmlDoc.getElementsByTagName("para")[0].attributes.getNamedItem("indent").nodeValue);
		var pageContent=xmlDoc.getElementsByTagName(pageID);//pageContent.length = 1
		
		//set header's display style
		if (pageContent[0].getElementsByTagName("header")[0].attributes.length > 0){//with attributes
			var divHeader = document.getElementById(headerID);
			var fntSize = pageContent[0].getElementsByTagName("header")[0].attributes.getNamedItem("size").nodeValue;
			var fntColor = pageContent[0].getElementsByTagName("header")[0].attributes.getNamedItem("color").nodeValue;
			var fntFamily = pageContent[0].getElementsByTagName("header")[0].attributes.getNamedItem("fontFamily").nodeValue;
			var paddingTop = pageContent[0].getElementsByTagName("header")[0].attributes.getNamedItem("paddingTop").nodeValue;
			var paddingLeft = pageContent[0].getElementsByTagName("header")[0].attributes.getNamedItem("paddingLeft").nodeValue;

			divHeader.style.fontSize = fntSize;
			divHeader.style.color = fntColor;
			divHeader.style.fontFamily = fntFamily;
			divHeader.style.paddingTop = paddingTop;
			divHeader.style.paddingLeft = paddingLeft;		
		}
		//get header text string
		document.getElementById(headerID).innerHTML = pageContent[0].getElementsByTagName("header")[0].childNodes[0].nodeValue;

		//set content's display style
		if (pageContent[0].getElementsByTagName("content")[0].attributes.length > 0){//with attributes
			var divHeader = document.getElementById(contentID);
			var fntSize = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("size").nodeValue;
			var fntColor = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("color").nodeValue;
			var fntFamily = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("fontFamily").nodeValue;
			var paddingTop = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("paddingTop").nodeValue;
			var paddingLeft = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("paddingLeft").nodeValue;
			var paddingRight = pageContent[0].getElementsByTagName("content")[0].attributes.getNamedItem("paddingRight").nodeValue;

			divHeader.style.fontSize = fntSize;
			divHeader.style.color = fntColor;
			divHeader.style.fontFamily = fntFamily;
			divHeader.style.paddingTop = paddingTop;
			divHeader.style.paddingLeft = paddingLeft;
			divHeader.style.paddingRight = paddingRight;
			divHeader.style.lineHeight = "120%";		
		}		
		//get content text string
		var txtstring="";
		for (var i=0; i<pageContent[0].getElementsByTagName("para").length;i++){
			if (pageContent[0].getElementsByTagName("para")[i].attributes.length > 0){//with attributes
				var indentValue = pageContent[0].getElementsByTagName("para")[i].attributes.getNamedItem("indent").nodeValue;
				if ( indentValue >0){//check the value of indent attribute
					txtstring += "<div style='padding-left:";
					txtstring += indentValue;
					txtstring += "px;'>";
				}
				
			}else{
				txtstring += "<p>";
			}
			//check para childnodes
			for (var j=0; j<pageContent[0].getElementsByTagName("para")[i].childNodes.length; j++){
				
				if (pageContent[0].getElementsByTagName("para")[i].childNodes[j].nodeName == "bold"){
					txtstring += "<b>";
					txtstring += pageContent[0].getElementsByTagName("para")[i].childNodes[j].childNodes[0].nodeValue;
					txtstring += "</b>";
				}else if (pageContent[0].getElementsByTagName("para")[i].childNodes[j].nodeName == "linebreak"){
					txtstring += "<br />";
				}else{
					txtstring += pageContent[0].getElementsByTagName("para")[i].childNodes[j].nodeValue;
				}
			}
			if (indentValue >0){
				txtstring += "</div>";
			}else{
				txtstring += "</p>";
			}
		}
		
		document.getElementById(contentID).innerHTML = txtstring;
		
	//}
}
/*********************************************************
Purpose: it is a work around solution for having different top value on the submenu
Parameters:	
*********************************************************/
function browserChk(){
	var browser=navigator.appName;
	
	if (browser=="Microsoft Internet Explorer"){
		changecss('.subnav','top','156px');
	}
	else{
		changecss('.subnav','top','164px');
	}
	
}
/*********************************************************
Purpose: show on/off a div block
Parameters:	idName, the DIV's idname for content display on/off
*********************************************************/
function showDivBlock(idName, action){
	var oDiv = document.getElementById(idName);
	
	if (action == "hidden"){
		oDiv.style.display="none";
	}else {
		oDiv.style.display="block";
	}
	
}
function toggleDivBlock(idName){
	var oDiv = document.getElementById(idName);
	if (oDiv.style.display == "none"){
		oDiv.style.display="block";
	}else{
		oDiv.style.display="none";
	}

}
/*********************************************************
Purpose: set the width of a DIV
Parameters:	
*********************************************************/
function setDivWidth(idName, w){
	var oDiv = document.getElementById(idName);
	oDiv.style.width = w;
}

//create a branch view
function createBranchView(divObj, nodeObj){
	var nodeElem = new Object();
	for (var i=0; i<nodeObj.length; i++){	
		var menuName = nodeObj[i].childNodes[0].nodeValue;//submenu name
		if (i != (nodeObj.length - 1))
			var iconpath = "img/joinmiddle.gif";
		else
			var iconpath = "img/joinbottom.gif";
			
		var clickAction = "javascript:btnAction('"+nodeObj[i].attributes.getNamedItem("id").nodeValue+"');";
		
		nodeElem = CreateTreeItem( divObj, iconpath, iconpath, menuName, clickAction);
		//Toggle(nodeElem.id);
		
		if (nodeObj[i].getElementsByTagName("leave").length > 0){
			createBranchView(nodeElem.div, nodeObj[i].getElementsByTagName("leave"));
		}
	}

}

var rootCellArray = new Array();
/*********************************************************
Purpose: create tree views 
Parameters:	
*********************************************************/
function CreateProjectExplorer(idName, filename)
{
	
	var xmlDoc = loadXMLDoc(filename);
	var treesContent = xmlDoc.getElementsByTagName("trees");
	var treeData = treesContent[0].getElementsByTagName("tree");
	var oDiv = document.getElementById(idName);
	
	
	for (var i=0; i<treeData.length; i++){//how many buttons have the submenu
		var treeid = treeData[i].attributes.getNamedItem("id").nodeValue;
		//create a rootNode for each tree, the idName of each rootTree is from a XML file	
		div = document.createElement("DIV");
		oDiv.appendChild( div );
		div.setAttribute ("id", treeid);
		div.style.display = "none";
		
		rootCellArray[i] = div;	
		
		var branchData = treeData[i].getElementsByTagName("branch");
		var nodeItem = new Object();
		for (var j=0;j<branchData.length;j++){//how many submenu in each main button
			var branchName = branchData[j].childNodes[0].nodeValue;//submenu name
			var iconpath = "img/leaf.gif";
			
			var nodeData = branchData[j].getElementsByTagName("node");
			
			var btnaction = "javascript:btnAction('"+branchData[j].attributes.getNamedItem("id").nodeValue+"');";
			nodeItem = CreateTreeItem( rootCellArray[i], iconpath, "", branchName, btnaction);
			//Toggle(nodeItem.id);	
			
			
			if (nodeData.length > 0 ){//there is a child node in this branch
				
				//var btnaction = "javascript:Toggle(\""+branchName+"\");";//no action for branch name
				//nodeItem = CreateTreeItem( rootCellArray[i], iconpath, iconpath, branchName, btnaction);
				//Toggle(nodeItem.id);
													
				//create the subbranch
				createBranchView(nodeItem.div, nodeData);
							
			}/*else{//no child node in this branch
				
				var btnaction = "javascript:btnAction('"+branchData[j].attributes.getNamedItem("id").nodeValue+"');";
				nodeItem = CreateTreeItem( rootCellArray[i], iconpath, iconpath, branchName, btnaction);
				//Toggle(nodeItem.id);	
			}*/
		}

	}

}

//show one tree view of respective main button
function showOneTree(globalTree, childTree, targetId, targetWidth){
		//reset all child trees to hidden
		showDivBlock('tree_about', 'hidden');
		showDivBlock('tree_products', 'hidden');
		showDivBlock('tree_services', 'hidden');
		showDivBlock('tree_news', 'hidden');
		
		showDivBlock(globalTree, 'visible');
		showDivBlock(childTree, 'visible');
		setDivWidth(targetId, targetWidth);
}

//display off the global tree view
function offGlobalTreeView(globalTree, targetId, targetWidth){
		showDivBlock(globalTree, 'hidden');
		setDivWidth(targetId, targetWidth);
}
/*********************************************************
Purpose: Create a form for consultation
Parameters:	idName, the DIV's idname for content display
*********************************************************/
function createForm_consultation(idName){
	var txtstring="";

	txtstring += "<form action='http://app.sgizmo.com/s/passme.php?id=YBKNO65XPPPN6UD4NAYND9D785S0OP-123536&quot;' method='post' enctype='multipart/form-data' class='sg_Survey_Form' id='sg_FormFor123536' >";
	txtstring += "<div id='sg_wrapper'>";
	txtstring += "<div id='sg_header'>";
	txtstring += "<div id='sg_header_hook_1'></div>";				       
	txtstring += "<div id='sg_header_hook_2'></div>";
	txtstring += "</div>";			    
	txtstring += "<div id='sg_content'>";
	txtstring += "<div id='sg_content_hook_1'></div>";
	txtstring += "<!-- QUESTIONS INSERTED HERE -->";       
	txtstring += "<div class='sg_QuestionSet'><!-- QS Start -->";
	txtstring += "<div class='sg_Question    sg_EssayWrapper' id='sg_dhtml_q2'  >";
	txtstring += "<input type='hidden' id='hidden_2' name='hidden_2' value='false' />";
	txtstring += "<div class='sg_QuestionTitle'><script type='text/javascript' >var sg_first_number = 1;</script>";
	txtstring += "<span class='qNumber' id='qNumber_2' >1. </span><label for='Q_2' >What are the health problems which have been of great concerns to you?</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div>";
	txtstring += "<div class='sg_ControlSet' ><textarea class='sg_Essay sg_Required'  id='Q_2'  name='Q_2'  cols='80'  rows='10'  ></textarea></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
						
	txtstring += "<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q3'  >";
	txtstring += "<input type='hidden' id='hidden_3' name='hidden_3' value='false' />";
	txtstring += "<div class='sg_QuestionTitle'>";
	txtstring += "<span class='qNumber' id='qNumber_3' >2. </span>How difficult has it been to get a solution online?<span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div>";
	txtstring += "<div class='sg_ControlSet' >";
	txtstring += "<div class='sg_Radio_Options sg_Required' >";
	txtstring += "<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O0'  title='Very difficult'  value='O0' /></td><td class='sg_TD2' ><label for='Q_3O0' >Very difficult</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O1'  title='Somehow difficult'  value='O1' /></td><td class='sg_TD2' ><label for='Q_3O1' >Somehow difficult</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O2'  title='Not that difficult'  value='O2' /></td><td class='sg_TD2' ><label for='Q_3O2' >Not that difficult</label></td></tr>";
	txtstring += "</table>";
	txtstring += "</div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
					
	txtstring += "<div class='sg_Question   sg_EssayWrapper' id='sg_dhtml_q4'  >";
	txtstring += "<input type='hidden' id='hidden_4' name='hidden_4' value='false' />";
	txtstring += "<div class='sg_QuestionTitle'>";
	txtstring += "<span class='qNumber' id='qNumber_4' >3. </span><label for='Q_4' >Are there any other health topics which might be of interest to you?</label></div>";
	txtstring += "<div class='sg_ControlSet' ><textarea class='sg_Essay'  id='Q_4'  name='Q_4'  cols='80'  rows='5'  ></textarea></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
							
	txtstring += "<div class='sg_Question    sg_GroupWrapper' id='sg_dhtml_q5'  >";
	txtstring += "<input type='hidden' id='hidden_5' name='hidden_5' value='false' />";
	txtstring += "<div class='sg_QuestionTitle'>";
	txtstring += "<span class='qNumber' id='qNumber_5' >4. </span>Please help us with your personal information so that we can bring our best advices to you.</div>";
	txtstring += "<div class='sg_ControlSet' ><div class='sg_Group sg_Group_ContactInfo'>";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_6' >First Name</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_6'  id='sg_Q_6'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_6_msg' >&nbsp;</span></div></div>";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_7' >Last Name</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_7'  id='sg_Q_7'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_7_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_10' >Home Address</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_10'  id='sg_Q_10'  value='' size='60' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_10_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_14' >Postal Code</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_14'  id='sg_Q_14'  value='' size='8' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_14_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_15' >Country</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_15'  id='sg_Q_15'  value='' size='15' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_15_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_16' >Email Address</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_16'  id='sg_Q_16'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_16_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_19' >Mobile Phone</label><span class='sg_RequiredAsterix' ><img src='images/req.gif' alt=' Required Question' /></span></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_19'  id='sg_Q_19'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_19_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_GroupItem' >";
	txtstring += "<div class='sg_GroupLabel' ><label for='sg_Q_20' >URL (optional)</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_20'  id='sg_Q_20'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_20_msg' >&nbsp;</span></div></div><br clear='all' /></div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";							
	txtstring += "<!-- QS End --></div>";
	txtstring += "<br clear='all' />";
	txtstring += "<div class='sg_Button_Group'>";
	txtstring += "<input type='submit' class='sg_Submit' id='sg_SubmitButton' name='sGizmoSubmitButton' value='Submit My Questions Now!' />";
	txtstring += "</div>";				        
	txtstring += "<div id='sg_content_hook_2'></div>";
	txtstring += "</div>";				
	txtstring += "<div id='sg_footer'>";        
	txtstring += "<div id='sg_footer_hook_1'></div>";
	txtstring += "<div id='sg_footer_hook_2'></div>";
	txtstring += "</div>";
	txtstring += "</div>";				
	txtstring += "<input type='hidden' name='sGizmoCurrent_Fields'  id='sGizmoCurrent_Fields' value='Q_2,Q_3,Q_4,5,Q_6,Q_7,Q_10,Q_14,Q_15,Q_16,Q_19,Q_20' /><input type='hidden' name='sGizmoCurrentPageNum'  id='sGizmoCurrentPageNum' value='1' /><input type='hidden' name='sGizmoCurrentPageIndex'  id='sGizmoCurrentPageIndex' value='0' /><input type='hidden' name='sGizmoCurrentSection' value='1' /><input type='hidden' name='sGizmoAJAXSubmitButtonUsed' id='sGizmoAJAXSubmitButtonUsed' value='' /><input type='hidden' name='sGizmoNextPageNum' value='2' /><input type='hidden' name='sgTimeStamp' value='1239334721' /></form>";
	txtstring += "<div style='color:black;font:normal 10px/12px arial;margin-top:20px;' class='sg_PoweredBy' ><a href='http://www.surveygizmo.com/?ap=sg4&img=t'  target='_blank' ><img src='images/underTheHood.gif' alt='Online Survey Software' border='0' /></a><br /><a href='http://www.surveygizmo.com/?ap=sg4'  target='_blank'  style='color:black;font-size:9px;white-space:nowrap'>Online Surveys</a> powered by SurveyGizmo </div>";				
		
	document.getElementById(idName).innerHTML = txtstring;
}

/*********************************************************
Purpose: Create a form for tips form
Parameters:	idName, the DIV's idname for content display
*********************************************************/
function createForm_tips(idName){
	var txtstring="";
	txtstring += "<center><form method='post' action='http://www.aweber.com/scripts/addlead.pl'>";

	if (idName == "form_beautyTips"){
		txtstring += "<input type='hidden' name='meta_web_form_id' value='1111359886'>";		
		txtstring += "<input type='hidden' name='redirect' value='http://www.naturesgallery.com.sg/beauty-tips-thank-you.html' id='redirect_6174e4acd658d95d730ae3466fa08f9e'>";
		txtstring += "<input type='hidden' name='unit' value='ng_beauty_tips'>";
		txtstring += "<input type='hidden' name='meta_required' value='from'>";

	}else if (idName == "form_wellnessTips"){
		txtstring += "<input type='hidden' name='meta_web_form_id' value='823594473'>";		
		txtstring += "<input type='hidden' name='redirect' value='http://www.naturesgallery.com.sg/health-tips-thank-you.html' id='redirect_0696be3c6832fedf58498c3351c12f82'>";
		txtstring += "<input type='hidden' name='unit' value='ng_health_tips'>";
		txtstring += "<input type='hidden' name='meta_required' value='from'>";
		
	}else if (idName == "form_events"){
		txtstring += "<input type='hidden' name='meta_web_form_id' value='336272851'>";		
		txtstring += "<input type='hidden' name='redirect' value='http://www.naturesgallery.com.sg/promotions-events-thank-you.html' id='redirect_3bea09254d23243bed3a375ba069ddd1'>";
		txtstring += "<input type='hidden' name='unit' value='ng_promo_event'>";		
		txtstring += "<input type='hidden' name='meta_required' value='custom Surname,from'>";
	}
	txtstring += "<input type='hidden' name='meta_split_id' value=''>";
	txtstring += "<input type='hidden' name='meta_redirect_onlist' value=''>";
	txtstring += "<input type='hidden' name='meta_adtracking' value=''>";
	txtstring += "<input type='hidden' name='meta_message' value='1'>";
	txtstring += "<input type='hidden' name='meta_forward_vars' value='0'>";
	txtstring += "<table cellspacing='5'>";
	if (idName == "form_beautyTips"){
		txtstring += "<tr><td colspan=2><div><strong>If you want to stay ahead with our latest beauty tips, pls subscribe to our mailing list below. </strong></div></td></tr>";
	}else if (idName == "form_wellnessTips"){
		txtstring += "<tr><td colspan=2><div><strong>If you are concern with your health problems and wanted to be constantly updated with new health care secrets, I urge you to subscribe to our mailing list now! </strong></div></td></tr>";
	}else if (idName == "form_events"){
		txtstring += "<tr><td colspan=2><div><strong>Please fill in the form below so that we can send you info via emails and sms</strong></div></td></tr>";		
	}
	txtstring += "<tr><td align='right'>First Name:</td><td><input type='text' name='name' value='' size='20'></td></tr>";
	txtstring += "<tr><td align='right'>Surname:</td><td><input type='text' name='custom Surname' value='' size='20'></td></tr>";
	txtstring += "<tr><td align='right'>Email:</td><td><input type='text' name='from' value='' size='20'></td></tr>";
	if (idName == "form_events"){
		txtstring += "<tr><td align='right'>Mobile Number:</td><td><input type='text' name='custom Mobile Number' value='' size='20'></td></tr>";		
	}else{
		txtstring += "<tr><td align='right'>Country:</td><td><input type='text' name='custom Country' value='' size='20'></td></tr>";
	}
	txtstring += "<tr><td colspan=2><div><em>We hate spams as much as you do and we will never give away your info without your permission!</em></div></td></tr>";
	if (idName == "form_events"){
		txtstring += "<tr><td align='center' colspan='2'><input type='submit' name='submit' value='Yes, pls send me promotions and events updates'></td></tr>";		
	}else{
		txtstring += "<tr><td align='center' colspan='2'><input type='submit' name='submit' value='Join Now!'></td></tr>";
	}
	txtstring += "</table>";
	txtstring += "</form>";				
	txtstring += "<img src='http://forms.aweber.com/form/displays.htm?id=jIyMjMysnBwcbA==' border='0' />";
	txtstring += "</center>";
	
	document.getElementById(idName).innerHTML = txtstring;
}        
/*********************************************************
Purpose: Create a form for promotion
Parameters:	idName, the DIV's idname for content display
*********************************************************/
function createForm_signup(idName){
	var txtstring="";
	if (idName == "form_BIM4"){
		txtstring += "<form action='http://app.sgizmo.com/s/passme.php?id=G0BLZ05CQ6NAV443Y5D9XPC9ALGJYC-133850&quot; ' method='post'  enctype='multipart/form-data' class='sg_Survey_Form' id='sg_FormFor133850' >";
	}else{
		txtstring += "<form action='http://app.sgizmo.com/s/passme.php?id=36R85HYQDVRP8PKGMM41TUT8XY1UDX-124065&quot; ' method='post'  enctype='multipart/form-data' class='sg_Survey_Form' id='sg_FormFor124065' >";
	}
	txtstring += "  <div id='sg_wrapper'>";
	txtstring += "      <div id='sg_content'>";
	txtstring += "         <!-- QUESTIONS INSERTED HERE -->";
	txtstring += "         	<div class='sg_QuestionSet'><!-- QS Start -->";
	txtstring += "  			<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q2'  >";
	txtstring += "  				<input type='hidden' id='hidden_2' name='hidden_2' value='false' />";
	txtstring += "  				<div class='sg_QuestionTitle'><script type='text/javascript' >var sg_first_number = 1;</script>";
	txtstring += "  					<span class='qNumber' id='qNumber_2' >1. </span>What is the best time to call you?</div>";
	txtstring += "  				<div class='sg_ControlSet' >";
	txtstring += "  				<div class='sg_Radio_Options' >";
	txtstring += "  					<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O0'  title='Morning'  value='O0' /></td><td class='sg_TD2' ><label for='Q_2O0' >Morning</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O1'  title='Afternoon'  value='O1' /></td><td class='sg_TD2' ><label for='Q_2O1' >Afternoon</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O2'  title='Evening'  value='O2' /></td><td class='sg_TD2' ><label for='Q_2O2' >Evening</label></td></tr>";
	txtstring += "  					</table>";
	txtstring += "  				</div></div>";
	txtstring += "  				<div class='sg_Question_Footer'></div>";
	txtstring += "  			</div>";
	txtstring += "  			<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q3'  >";
	txtstring += " 				<input type='hidden' id='hidden_3' name='hidden_3' value='false' />";
	txtstring += "  				<div class='sg_QuestionTitle'>";
	txtstring += "  					<span class='qNumber' id='qNumber_3' >2. </span>What is your gender?</div>";
	txtstring += "  				<div class='sg_ControlSet' >";
	txtstring += "  				<div class='sg_Radio_Options' >";
	txtstring += "  					<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O0'  title='Male'  value='O0' /></td><td class='sg_TD2' ><label for='Q_3O0' >Male</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O1'  title='Female'  value='O1' /></td><td class='sg_TD2' ><label for='Q_3O1' >Female</label></td></tr>";
	txtstring += "  					</table>";
	txtstring += "  				</div></div>";
	txtstring += "  				<div class='sg_Question_Footer'></div>";
	txtstring += "  			</div>";
	txtstring += "  			<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q4'  >";
	txtstring += "  				<input type='hidden' id='hidden_4' name='hidden_4' value='false' />";
	txtstring += " 					<div class='sg_QuestionTitle'>";
	txtstring += "  					<span class='qNumber' id='qNumber_4' >3. </span>What is your age group?</div>";
	txtstring += "  				<div class='sg_ControlSet' >";
	txtstring += "  				<div class='sg_Radio_Options' >";
	txtstring += "  					<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O0'  title='Below 18'  value='O0' /></td><td class='sg_TD2' ><label for='Q_4O0' >Below 18</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O1'  title='18~25'  value='O1' /></td><td class='sg_TD2' ><label for='Q_4O1' >18~25</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O2'  title='26~35'  value='O2' /></td><td class='sg_TD2' ><label for='Q_4O2' >26~35</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O3'  title='36~45'  value='O3' /></td><td class='sg_TD2' ><label for='Q_4O3' >36~45</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O4'  title='46~55'  value='O4' /></td><td class='sg_TD2' ><label for='Q_4O4' >46~55</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O5'  title='55~60'  value='O5' /></td><td class='sg_TD2' ><label for='Q_4O5' >55~60</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O6'  title='Above 60'  value='O6' /></td><td class='sg_TD2' ><label for='Q_4O6' >Above 60</label></td></tr>";
	txtstring += "  					</table>";
	txtstring += "  				</div></div>";
	txtstring += "  				<div class='sg_Question_Footer'></div>";
	txtstring += " 				</div>";
	txtstring += "  			<div class='sg_Question    sg_GroupWrapper' id='sg_dhtml_q5'  >";
	txtstring += "  				<input type='hidden' id='hidden_5' name='hidden_5' value='false' />";
	txtstring += "  				<div class='sg_QuestionTitle'>";
	txtstring += "  					<span class='qNumber' id='qNumber_5' >4. </span>Please fill in your particulars so that we can arrange for an appointment with you.</div>";
	txtstring += "  				<div class='sg_ControlSet' ><div class='sg_Group sg_Group_ContactInfo'>";
	txtstring += "  					<div class='sg_GroupItem ' >";
	txtstring += "  						<div class='sg_GroupLabel' ><label for='sg_Q_6' >First Name</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_6'  id='sg_Q_6'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_6_msg' >&nbsp;</span></div></div>";
	txtstring += "  					<div class='sg_GroupItem ' >";
	txtstring += "  						<div class='sg_GroupLabel' ><label for='sg_Q_7' >Surname</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_7'  id='sg_Q_7'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_7_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "  					<div class='sg_GroupItem ' >";
	txtstring += "  						<div class='sg_GroupLabel' ><label for='sg_Q_15' >Country</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_15'  id='sg_Q_15'  value='' size='15' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_15_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "  					<div class='sg_GroupItem ' >";
	txtstring += "  						<div class='sg_GroupLabel' ><label for='sg_Q_16' >Email Address</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_16'  id='sg_Q_16'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_16_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "  					<div class='sg_GroupItem ' >";
	txtstring += "  						<div class='sg_GroupLabel' ><label for='sg_Q_19' >Mobile Phone</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_19'  id='sg_Q_19'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_19_msg' >&nbsp;</span></div></div><br clear='all' /><br clear='all' /></div></div>";
	txtstring += "  				<div class='sg_Question_Footer'></div>";
	txtstring += "  			</div>";
	txtstring += "  		</div><!-- QS End -->";
	txtstring += "         <br clear='all' />";
	txtstring += "  	   <div class='sg_Button_Group'>";
	txtstring += "            <input type='submit' class='sg_Submit' id='sg_SubmitButton' name='sGizmoSubmitButton' value='Yes, please call me up for an appointment!' />";
	txtstring += "  	   </div>";
	txtstring += "      </div><!-- sg_content -->";
	txtstring += "      <div id='sg_footer'>";
	txtstring += "          <div id='sg_footer_hook_1'></div>";
	txtstring += "          <div id='sg_footer_hook_2'></div>";
	txtstring += "      </div>";
	txtstring += "  </div><!-- sg_wrapper -->";
	if (idName == "form_BIM4"){
		txtstring += "  <input type='hidden' name='sGizmoCurrent_Fields'  id='sGizmoCurrent_Fields' value='Q_2,Q_3,Q_4,5,Q_6,Q_7,Q_15,Q_16,Q_19' /><input type='hidden' name='sGizmoCurrentPageNum'  id='sGizmoCurrentPageNum' value='1' /><input type='hidden' name='sGizmoCurrentPageIndex'  id='sGizmoCurrentPageIndex' value='0' /><input type='hidden' name='sGizmoCurrentSection' value='1' /><input type='hidden' name='sGizmoAJAXSubmitButtonUsed' id='sGizmoAJAXSubmitButtonUsed' value='' /><input type='hidden' name='sGizmoNextPageNum' value='2' /><input type='hidden' name='sgTimeStamp' value='1241840431' /></form>";
	}else{
		txtstring += "  <input type='hidden' name='sGizmoCurrent_Fields'  id='sGizmoCurrent_Fields' value='Q_2,Q_3,Q_4,5,Q_6,Q_7,Q_15,Q_16,Q_19' /><input type='hidden' name='sGizmoCurrentPageNum'  id='sGizmoCurrentPageNum' value='1' /><input type='hidden' name='sGizmoCurrentPageIndex'  id='sGizmoCurrentPageIndex' value='0' /><input type='hidden' name='sGizmoCurrentSection' value='1' /><input type='hidden' name='sGizmoAJAXSubmitButtonUsed' id='sGizmoAJAXSubmitButtonUsed' value='' /><input type='hidden' name='sGizmoNextPageNum' value='2' /><input type='hidden' name='sgTimeStamp' value='1241232636' /></form>";
	}
	txtstring += "  <div style='color:black;font:normal 10px/12px arial;margin-top:20px;' class='sg_PoweredBy' ><a href='http://www.surveygizmo.com/?ap=sg4&img=t'  target='_blank' ><img src='images/underTheHood.gif' alt='Online Survey Software' border='0' /></a><br /><a href='http://www.surveygizmo.com/?ap=sg4'  target='_blank'  style='color:black;font-size:9px;white-space:nowrap'>Online Surveys</a> powered by SurveyGizmo </div>";             
		            
	document.getElementById(idName).innerHTML = txtstring;
}
/*********************************************************
Purpose: Create a form for How Join Us
Parameters:	idName, the DIV's idname for content display
*********************************************************/
function createForm_howJoinUs(idName){
	var txtstring="";
	txtstring += "<form action='http://app.sgizmo.com/s/passme.php?id=4QVLLXHA9V37O7O6BY4HGBZBVJOOQ3-172420' method='post'  enctype='multipart/form-data' class='sg_Survey_Form' id='sg_FormFor172420' >";
	txtstring += "<div id='sg_wrapper'>";
	txtstring += "    <div id='sg_header'>";
	txtstring += "       <div id='sg_header_hook_1'></div>";
	txtstring += "       <div id='sg_header_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "    <div id='sg_content'>";
	txtstring += "        <div id='sg_content_hook_1'></div>";
	txtstring += "           <!-- QUESTIONS INSERTED HERE -->";       
	txtstring += "           <div class='sg_QuestionSet'><!-- QS Start -->";
	txtstring += "<div class='sg_Question   sg_TextboxWrapper' id='sg_dhtml_q2'  >";
	txtstring += "<input type='hidden' id='hidden_2' name='hidden_2' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'><script type='text/javascript' >var sg_first_number = 1;</script>";
	txtstring += "		<span class='qNumber' id='qNumber_2' >1. </span><label for='sg_Q_2' >What is your current profession?</label></div>";
	txtstring += "	<div class='sg_ControlSet' ><input class='sg_Textbox sg_Required'  name='Q_2'  id='sg_Q_2'  value='' size='50' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_2_msg' >&nbsp;</span></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question   sg_EssayWrapper' id='sg_dhtml_q3'  >";
	txtstring += "<input type='hidden' id='hidden_3' name='hidden_3' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_3' >2. </span><label for='Q_3' >Why do you want to join us? (Write 2-3 paragraphs)</label></div>";
	txtstring += "	<div class='sg_ControlSet' ><textarea class='sg_Essay sg_Required'  id='Q_3'  name='Q_3'  cols='80'  rows='10'  ></textarea></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q4'  >";
	txtstring += "<input type='hidden' id='hidden_4' name='hidden_4' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_4' >3. </span>How many hours per week are you willing to put into this business?</div>";
	txtstring += "	<div class='sg_ControlSet' >";
	txtstring += "	<div class='sg_Radio_Options sg_Required' >";
	txtstring += "		<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O0'  title='0-10'  value='O0' /></td><td class='sg_TD2' ><label for='Q_4O0' >0-10</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O1'  title='11-20'  value='O1' /></td><td class='sg_TD2' ><label for='Q_4O1' >11-20</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O2'  title='21-30'  value='O2' /></td><td class='sg_TD2' ><label for='Q_4O2' >21-30</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_4'  id='Q_4O3'  title='&gt;30'  value='O3' /></td><td class='sg_TD2' ><label for='Q_4O3' >>30</label></td></tr>";
	txtstring += "		</table>";
	txtstring += "	</div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q5'  >";
	txtstring += "<input type='hidden' id='hidden_5' name='hidden_5' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_5' >4. </span>Do you have any sales and marketing experience before?</div>";
	txtstring += "	<div class='sg_ControlSet' >";
	txtstring += "	<div class='sg_Radio_Options sg_Required' >";
	txtstring += "		<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_5'  id='Q_5O0'  title='Yes'  value='O0' /></td><td class='sg_TD2' ><label for='Q_5O0' >Yes</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_5'  id='Q_5O1'  title='No'  value='O1' /></td><td class='sg_TD2' ><label for='Q_5O1' >No</label></td></tr><tr class='noFlicker' ><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_5'  id='Q_5O2'  title='I am not sure if it is consider'  value='O2' /></td><td class='sg_TD2' ><label for='Q_5O2' >I am not sure if it is consider</label></td></tr>";
	txtstring += "		</table>";
	txtstring += "	</div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question   sg_EssayWrapper' id='sg_dhtml_q6'  >";
	txtstring += "<input type='hidden' id='hidden_6' name='hidden_6' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_6' >5. </span><label for='Q_6' >What skills do you think you can contribute to this business?</label></div>";
	txtstring += "	<div class='sg_ControlSet' ><textarea class='sg_Essay sg_Required'  id='Q_6'  name='Q_6'  cols='80'  rows='5'  ></textarea></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question   sg_EssayWrapper' id='sg_dhtml_q7'  >";
	txtstring += "<input type='hidden' id='hidden_7' name='hidden_7' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_7' >6. </span><label for='Q_7' >What is the most important skill you would like to learn while growing with the company?</label></div>";
	txtstring += "	<div class='sg_ControlSet' ><textarea class='sg_Essay sg_Required'  id='Q_7'  name='Q_7'  cols='80'  rows='5'  ></textarea></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<div class='sg_Question    sg_GroupWrapper' id='sg_dhtml_q8'  >";
	txtstring += "<input type='hidden' id='hidden_8' name='hidden_8' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_8' >7. </span>Please provide your contact information so that we can arrange for an appointment with you.</div>";
	txtstring += "	<div class='sg_ControlSet' ><div class='sg_Group sg_Group_ContactInfo'>";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_9' >First Name</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_9'  id='sg_Q_9'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_9_msg' >&nbsp;</span></div></div>";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_10' >Surname</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_10'  id='sg_Q_10'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_10_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_11' >Gender</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_11'  id='sg_Q_11'  value='' size='10' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_11_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_13' >Home Address</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_13'  id='sg_Q_13'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_13_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_17' >Postal Code</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_17'  id='sg_Q_17'  value='' size='8' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_17_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_18' >Country</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_18'  id='sg_Q_18'  value='' size='15' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_18_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_19' >Email Address</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_19'  id='sg_Q_19'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_19_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_22' >Mobile Phone</label></div><div class='sg_GroupInput' ><input class='sg_Textbox sg_Required'  name='Q_22'  id='sg_Q_22'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_22_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<!-- QS End --></div>";
	txtstring += "           <br clear='all' />";
	txtstring += "		   <div class='sg_Button_Group'>";
	txtstring += "              <input type='submit' class='sg_Submit' id='sg_SubmitButton' name='sGizmoSubmitButton' value='Yes, Call Me For An Appointment' />";
	txtstring += "		   </div>";
	txtstring += "        <div id='sg_content_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "    <div id='sg_footer'>";
	txtstring += "        <div id='sg_footer_hook_1'></div>";
	txtstring += "        <div id='sg_footer_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "</div>";
	txtstring += "<input type='hidden' name='sGizmoCurrent_Fields'  id='sGizmoCurrent_Fields' value='Q_2,Q_3,Q_4,Q_5,Q_6,Q_7,8,Q_9,Q_10,Q_11,Q_13,Q_17,Q_18,Q_19,Q_22' /><input type='hidden' name='sGizmoCurrentPageNum'  id='sGizmoCurrentPageNum' value='1' /><input type='hidden' name='sGizmoCurrentPageIndex'  id='sGizmoCurrentPageIndex' value='0' /><input type='hidden' name='sGizmoCurrentSection' value='1' /><input type='hidden' name='sGizmoAJAXSubmitButtonUsed' id='sGizmoAJAXSubmitButtonUsed' value='' /><input type='hidden' name='sGizmoNextPageNum' value='2' /><input type='hidden' name='sgTimeStamp' value='1251293723' /></form>";
	txtstring += "<div style='color:black;font:normal 10px/12px arial;margin-top:20px;' class='sg_PoweredBy' ><a href='http://www.surveygizmo.com/?ap=sg4&img=t'  target='_blank' ><img src='images/underTheHood.gif' alt='Online Survey Software' border='0' /></a><br /><a href='http://www.surveygizmo.com/?ap=sg4'  target='_blank'  style='color:black;font-size:9px;white-space:nowrap'>Online Surveys</a> powered by SurveyGizmo </div>	";

	document.getElementById(idName).innerHTML = txtstring;
} 
/*********************************************************
Purpose: Create a form for Sparty
Parameters:	idName, the DIV's idname for content display
*********************************************************/
function createForm_sparty(idName){
	var txtstring="";
	
	txtstring += "<form action='http://app.sgizmo.com/s/passme.php?id=DC5RJOSX07LHZNF1JF87W0HRDD2429-172897' method='post'  enctype='multipart/form-data' class='sg_Survey_Form' id='sg_FormFor172897' >";
	txtstring += "<div id='sg_wrapper'>";
	txtstring += "    <div id='sg_header'>";
	txtstring += "       <div id='sg_header_hook_1'></div>";
	txtstring += "       <div id='sg_header_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "    <div id='sg_content'>";
	txtstring += "        <div id='sg_content_hook_1'></div>";
	txtstring += "           <!-- QUESTIONS INSERTED HERE --> ";      
	txtstring += "           <div class='sg_QuestionSet'><!-- QS Start -->";
	txtstring += "<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q2'  >";
	txtstring += "<input type='hidden' id='hidden_2' name='hidden_2' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'><script type='text/javascript' >var sg_first_number = 1;</script>";
	txtstring += "		<span class='qNumber' id='qNumber_2' >1. </span>My Sparty is estimated for ____ ladies (Sorry ladies only!)";
	txtstring += "<br/>PS: One single participant will do too as you're guaranteed to have a great time with our party hostess!</div>";
	txtstring += "	<div class='sg_ControlSet' >";
	txtstring += "	<div class='sg_Radio_Options' >";
	txtstring += "		<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' id='option_Q_2_O0'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O0'  title='2'  value='O0' /></td><td class='sg_TD2' ><label for='Q_2O0' >2</label></td></tr><tr class='noFlicker' id='option_Q_2_O1'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O1'  title='3'  value='O1' /></td><td class='sg_TD2' ><label for='Q_2O1' >3</label></td></tr><tr class='noFlicker' id='option_Q_2_O2'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O2'  title='4'  value='O2' /></td><td class='sg_TD2' ><label for='Q_2O2' >4</label></td></tr><tr class='noFlicker' id='option_Q_2_O3'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_2'  id='Q_2O3'  title='more than 4'  value='O3' /></td><td class='sg_TD2' ><label for='Q_2O3' >more than 4</label></td></tr>";
	txtstring += "		</table>";
	txtstring += "	</div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	
	txtstring += "<div class='sg_Question   sg_RadioWrapper' id='sg_dhtml_q3'  >";
	txtstring += "<input type='hidden' id='hidden_3' name='hidden_3' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_3' >2. </span>A good time to call me on a weekday would be</div>";
	txtstring += "	<div class='sg_ControlSet' >";
	txtstring += "	<div class='sg_Radio_Options' >";
	txtstring += "		<table class='sg_Table' cellspacing='0' ><tr class='noFlicker' id='option_Q_3_O0'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O0'  title='Morning'  value='O0' /></td><td class='sg_TD2' ><label for='Q_3O0' >Morning</label></td></tr><tr class='noFlicker' id='option_Q_3_O1'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O1'  title='Afternoon'  value='O1' /></td><td class='sg_TD2' ><label for='Q_3O1' >Afternoon</label></td></tr><tr class='noFlicker' id='option_Q_3_O2'><td class='sg_TD1' ><input class='sg_Radio' type='radio'  name='Q_3'  id='Q_3O2'  title='Evening'  value='O2' /></td><td class='sg_TD2' ><label for='Q_3O2' >Evening</label></td></tr>";
	txtstring += "		</table>";
	txtstring += "	</div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	
	txtstring += "<div class='sg_Question    sg_GroupWrapper' id='sg_dhtml_q4'  >";
	txtstring += "<input type='hidden' id='hidden_4' name='hidden_4' value='false' />";
	txtstring += "	<div class='sg_QuestionTitle'>";
	txtstring += "		<span class='qNumber' id='qNumber_4' >3. </span>Personal Particulars</div>";
	txtstring += "	<div class='sg_ControlSet' ><div class='sg_Group sg_Group_ContactInfo'>";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_5' >First Name</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_5'  id='sg_Q_5'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_5_msg' >&nbsp;</span></div></div>";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_6' >Family Name</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_6'  id='sg_Q_6'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_6_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_9' >Home Address</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_9'  id='sg_Q_9'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_9_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_13' >Postal Code</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_13'  id='sg_Q_13'  value='' size='8' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_13_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_14' >Country</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_14'  id='sg_Q_14'  value='' size='15' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_14_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_15' >Email Address</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_15'  id='sg_Q_15'  value='' size='45' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_15_msg' >&nbsp;</span></div></div><br clear='all' />";
	txtstring += "		<div class='sg_GroupItem ' >";
	txtstring += "			<div class='sg_GroupLabel' ><label for='sg_Q_18' >Mobile Phone</label></div><div class='sg_GroupInput' ><input class='sg_Textbox'  name='Q_18'  id='sg_Q_18'  value='' size='25' /><span class='sgValidationMessage' style='display:none;' id='sg_Q_18_msg' >&nbsp;</span></div></div><br clear='all' /><br clear='all' /></div></div>";
	txtstring += "<div class='sg_Question_Footer'></div>";
	txtstring += "</div>";
	txtstring += "<!-- QS End --></div>";
	
	txtstring += "           <br clear='all' />";
	txtstring += "		   <div class='sg_Button_Group'>";
	txtstring += "              <input type='submit' class='sg_Submit' id='sg_SubmitButton' name='sGizmoSubmitButton' value='Yes, Book Me For the Sparty!' />";
	txtstring += "		   </div>";
	txtstring += "        <div id='sg_content_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "    <div id='sg_footer'> ";  
	txtstring += "        <div id='sg_footer_hook_1'></div>";
	txtstring += "        <div id='sg_footer_hook_2'></div>";
	txtstring += "    </div>";
	txtstring += "</div>";
	txtstring += "<input type='hidden' name='sGizmoCurrent_Fields'  id='sGizmoCurrent_Fields' value='Q_2,Q_3,4,Q_5,Q_6,Q_9,Q_13,Q_14,Q_15,Q_18' /><input type='hidden' name='sGizmoCurrentPageNum'  id='sGizmoCurrentPageNum' value='1' /><input type='hidden' name='sGizmoCurrentPageIndex'  id='sGizmoCurrentPageIndex' value='0' /><input type='hidden' name='sGizmoCurrentSection' value='1' /><input type='hidden' name='sGizmoAJAXSubmitButtonUsed' id='sGizmoAJAXSubmitButtonUsed' value='' /><input type='hidden' name='sGizmoNextPageNum' value='2' /><input type='hidden' name='sgTimeStamp' value='1251605449' /></form>";
	txtstring += "<div style='color:black;font:normal 10px/12px arial;margin-top:20px;' class='sg_PoweredBy' ><a href='http://www.surveygizmo.com/?ap=sg4&img=t'  target='_blank' ><img src='images/underTheHood.gif' alt='Online Survey Software' border='0' /></a><br /><a href='http://www.surveygizmo.com/?ap=sg4'  target='_blank'  style='color:black;font-size:9px;white-space:nowrap'>Online Surveys</a> powered by SurveyGizmo </div>";

	document.getElementById(idName).innerHTML = txtstring;
} 
