function One_Col()
{
	cols = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	cols += "<tr>";
	cols += "<td width=\"540\"><image src=\"imgs/spacer.gif\" width=\"540\" height=\"10\"></td>";
	cols += "</tr>";
	cols += "<tr>";
	cols += "<td width=\"540\"><font size=\"2\">Single Column<br><br>Replace this text with actual content or picture.</font></td>";
	cols += "</tr>";
	cols += "</table>";
	content_editor.SetHTML(cols);
}

function Two_Col()
{
	cols = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	cols += "<tr>";
	cols += "<td width=\"240\"><image src=\"imgs/spacer.gif\" width=\"240\" height=\"10\"></td>";
	cols += "<td width=\"10\"><image src=\"imgs/spacer.gif\" width=\"10\" height=\"10\"></td>";
	cols += "<td width=\"290\"><image src=\"imgs/spacer.gif\" width=\"290\" height=\"10\"></td>";
	cols += "</tr>";
	cols += "<tr>";
	cols += "<td valign=\"top\" width=\"240\"><font size=\"2\">Left Column<br><br>Replace this text with actual content or picture.</font></td>";
	cols += "<td valign=\"top\" width=\"10\"><image src=\"imgs/spacer.gif\" width=\"10\" height=\"10\"></td>";
	cols += "<td valign=\"top\" width=\"290\"><font size=\"2\">Right Column<br><br>Replace this text with actual content or picture.</font></td>";
	cols += "</tr>";
	cols += "</table>";
	content_editor.SetHTML(cols);
}

function gotoppage()
{
	page_no = document.form1.page_no[document.form1.page_no.selectedIndex].value;
	window.location.href="pictures_list.php?page="+page_no;
}

function gotocpage(section)
{
	page_no = document.form1.page_no[document.form1.page_no.selectedIndex].value;
	window.location.href="contents_list.php?page="+page_no+"&section="+section;
}

function gotovpage(section)
{	
	page_no = document.form1.page_no[document.form1.page_no.selectedIndex].value;
	window.location.href="view_sections.php?page="+page_no+"&section="+section;
}

function gotohnpage(section, nb_anchor)
{	
	window.location.href="view_sections.php?page=1&section="+section+"#"+nb_anchor;
}

function redirect_to_page(page_no, section, nb_anchor)
{
	switch(section)
	{
		case 1:page_name = "location.php";
				break;
		case 2:page_name = "corporate_profile.php";
				break;
		case 3:page_name = "accommodation.php";
				break;
		case 4:page_name = "dining_entertainment.php";
				break;
		case 5:page_name = "facilities_spa.php";
				break;
		case 6:page_name = "research.php";
				break;
		case 7:page_name = "packages.php";
				break;
		case 8:page_name = "activities.php";
				break;
		case 9:page_name = "packages.php";
				break;
		case 10:page_name = "updates.php";
				break;
		case 12:page_name = "terms.php";
				break;
		case 13:page_name = "ecommunity.php";
				break;
		case 14:page_name = "facilities_msports.php";
				break;
		case 15:page_name = "facilities_recreation.php";
				break;
		case 16:page_name = "facilities_conference.php";
				break;
		case 17:page_name = "facilities_others.php";
				break;
		default:page_name = "location.php";
				break;
	}
	window.location.href=page_name+"?page="+page_no+"#"+nb_anchor;
}

function gotovpage_live(section)
{	
	page_no = document.form1.page_no[document.form1.page_no.selectedIndex].value;
	switch(section)
	{
		case 1:page_name = "location.php";
				break;
		case 2:page_name = "corporate_profile.php";
				break;
		case 3:page_name = "accommodation.php";
				break;
		case 4:page_name = "dining_entertainment.php";
				break;
		case 5:page_name = "facilities_spa.php";
				break;
		case 6:page_name = "research.php";
				break;
		case 7:page_name = "packages.php";
				break;
		case 8:page_name = "activities.php";
				break;
		case 9:page_name = "packages.php";
				break;
		case 10:page_name = "updates.php";
				break;
		case 12:page_name = "terms.php";
				break;
		case 13:page_name = "ecommunity.php";
				break;
		case 14:page_name = "facilities_msports.php";
				break;
		case 15:page_name = "facilities_recreation.php";
				break;
		case 16:page_name = "facilities_conference.php";
				break;
		case 17:page_name = "facilities_others.php";
				break;
		default:page_name = "location.php";
				break;
	}
	window.location.href=page_name+"?page="+page_no;
}

function CheckRequired()
{
	document.form1.content_body.value = content_editor.GetHTML();
//	document.form1.submit();
}

function TogglePicBrowse(n)
{
	document.form1.content_pic.disabled = !document.form1.pic_check.checked;
}

function SetTextNavStatus()
{
	document.form1.left_nav_text.disabled = !document.form1.left_nav_text.disabled;
	//	document.form1.left_nav_text.enabled = document.form1.news_bits.checked;
}

function SetTextFactStatus()
{
	document.form1.fast_facts_text.disabled = !document.form1.fast_facts_text.disabled;
	//	document.form1.left_nav_text.enabled = document.form1.news_bits.checked;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//MM_reloadPage(true);

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_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_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];}
}
