/*
			  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
			      width="690" height="269">
		<param name="movie" value="flash/header.swf"> 
		<param name="quality" value="high">
		<param name="menu" value="false">
		<param name="wmode" value="transparent">
*/

function showMenu(piPG){
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {  // if we've detected an acceptable version
	    var oeTags = '<script type="text/javascript">\n'
	    + "AC_FL_RunContent("
	    +  " 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',"
	    +  "'width','690',"
	    +  "'height','269',"
	    +  "'id','flash/header',"
	    +  "'align','middle',"
	    +  "'src','flash/header',"
	    +  "'quality','high',"
	    // +  "'bgcolor','#ffffff',"
	    +  "'menu','false',"
	    +  "'wmode','transparent',"
	    +  "'name','flash/header',"
	    +  "'allowscriptaccess','sameDomain',"
	    +  "'pluginspage','http://www.macromedia.com/go/getflashplayer',"
	    +  "'FlashVars','link=" + piPG + "',"
	    +  "'movie','flash/header' ); //end AC code\n"
	    + '</script>\n'
	    + '<noscript>\n'
	    + '<object '
	    +  'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	    +  'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
	    +  'width="690" height="269" id="flash/header" align="middle">'
	    +  '<param name="FlashVars" value="link=' + piPG + '" />\n'
	    +  '<param name="allowScriptAccess" value="sameDomain" />'
	    +  '<param name="movie" value="flash/header.swf" />'
	    +  '<param name="quality" value="high" />'
	    // +  '<param name="bgcolor" value="#ffffff" />'
	    +  '<param name="menu" value="false" />'
	    +  '<param name="wmode" value="transparent" />'
	    + '<embed src="flash/header.swf" '
		+  'FlashVars="link=' + piPG + '"'
	    +  'quality="high" '
	    // +  'bgcolor="#ffffff" '
	    +  'menu="false" '
	    +  'wmode="transparent" '
	    +  'width="690" '
	    +  'height="269" '
	    +  'name="flash/header" '
	    +  'align="middle" '
	    +  'allowScriptAccess="sameDomain" '
	    +  'type="application/x-shockwave-flash" '
	    +  'pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
	    + '</object>\n'
	    + '</noscript>\n';

		document.write(oeTags);   // embed the flash movie
	  } else {  // flash is too old or we can't detect the plugin
	    var alternateContent = 'openchapter.com left sice menu.<br>'
	  	+ 'This content requires the Macromedia Flash Player.<br>'
	   	+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	    document.write(alternateContent);  // insert non-flash content
	  }
}

var CAT_TEMPLATE = "template";
var CAT_DEMO = "demo";

function showFooter(psCategory) {
	var sRootPath, sPreOptions, sBrHeight;
	if (psCategory != null) {
		if (psCategory == CAT_TEMPLATE) {
			sRootPath = "../";
			sBrHeight = "5";
			sPreOptions
			= '<a href="index.html">Template Main</a> &nbsp; : &nbsp;\n'
			+ '<a href="webdesign-templates.html">Website Template</a> &nbsp; : &nbsp;\n'
			+ '<a href="flash-templates.html">Flash Templates</a> &nbsp; : &nbsp;\n'
			+ '<a href="flash-intros.html">Flash Intros</a> &nbsp; : &nbsp;\n'
			+ '<a href="phpnuke-themes.html">PHP-Nuke Themes</a> &nbsp; : &nbsp;\n'
			+ '<a href="logos.html">Logo templates</a> &nbsp; : &nbsp;\n'
			+ '<a href="corporate-identities.html">Corporate Identities</a> &nbsp; : &nbsp;\n'
			+ '<a href="faq.html">FAQ</a>\n'
			+ '<br style=" line-height:1px;">\n'
			+ '<br style=" line-height:' + sBrHeight + 'px;">\n';
		} else if (psCategory == CAT_DEMO) {
			sRootPath = "";
			sBrHeight = "5";
			sPreOptions
			= '<a href="software_package.html">Package Demo Main</a> &nbsp; : &nbsp;\n'
			
			// + '<a href="http://demo.openchapter.net/cart/" target="_blank">Shopping Cart</a> &nbsp; : &nbsp;\n'
			+ '<a href="demo_client_billing.html">Client Billing</a> &nbsp; : &nbsp;\n'
			// + '<a href="http://realty.openchapter.net" target="_blank">Realty</a> &nbsp; : &nbsp;\n'
			+ '<a href="demo_chatting.html">Chatting</a> &nbsp; : &nbsp;\n'
			// + '<a href="demo_webboard_forum.html">Forum</a> &nbsp; : &nbsp;\n'
			// + '<a href="demo_webboard_image_gallary.html">Image Gallary</a> &nbsp; : &nbsp;\n'
			// + '<a href="demo_webboard_vote.html">Vote</a> &nbsp; : &nbsp;\n'
			// + '<a href="demo_webboard_guest_book.html">Guest Book</a>\n'
			
			+ '<br style=" line-height:1px;">\n'
			+ '<br style=" line-height:' + sBrHeight + 'px;">\n';
		}
	} else {
		sRootPath = "";
		sPreOptions = "";
		sBrHeight = "5";
	}
    var oeTags = sPreOptions
	+ '<a href="' + sRootPath + 'index.html">Home</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'about_us.html">About Us</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'web_solution.html">Web Solution</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'software_solution.html">Software Solution</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'office_solution.html">Office Solution</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'support.html">Support</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'web_template/index.html">Design Template</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'contact.html">Contact</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'site_map.html">Site Map</a>\n'
	+ '<br style=" line-height:1px;">\n'
	+ '<br style=" line-height:' + sBrHeight + 'px;">\n'
	+ '<span>Copyright (c) 2006.  OpenChapter, Inc.  All rights reserved. &nbsp;&nbsp;\n'
	+ '<a href="' + sRootPath + 'privacy_policy.html">Privacy policy</a> &nbsp; : &nbsp;\n'
	+ '<a href="' + sRootPath + 'terms_of_use.html">Terms of use</a></span>\n';

	document.write(oeTags);
}

function showSimpleMenu(psHeading, psPath){
	var sPath;
	if (psPath == null)
		sPath = '';
	else
		sPath = psPath;
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {  // if we've detected an acceptable version
	    var oeTags = '<script type="text/javascript">\n'
	    + "AC_FL_RunContent("
	    +  " 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',"
	    +  "'width','690',"
	    +  "'height','184',"
	    +  "'id','" + sPath + "flash/simple_hdr',"
	    +  "'align','middle',"
	    +  "'src','" + sPath + "flash/simple_hdr',"
	    +  "'quality','high',"
	    // +  "'bgcolor','#ffffff',"
	    +  "'menu','false',"
	    +  "'wmode','transparent',"
	    +  "'name','" + sPath + "flash/simple_hdr',"
	    +  "'allowscriptaccess','sameDomain',"
	    +  "'pluginspage','http://www.macromedia.com/go/getflashplayer',"
	    +  "'FlashVars','heading=" + psHeading + "',"
	    +  "'movie','" + sPath + "flash/simple_hdr' ); //end AC code\n"
	    + '</script>\n'
	    + '<noscript>\n'
	    + '<object '
	    +  'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	    +  'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
	    +  'width="690" height="184" id="' + sPath + 'flash/simple_hdr" align="middle">'
	    +  '<param name="FlashVars" value="heading=' + psHeading + '" />\n'
	    +  '<param name="allowScriptAccess" value="sameDomain" />'
	    +  '<param name="movie" value="' + sPath + 'flash/simple_hdr.swf" />'
	    +  '<param name="quality" value="high" />'
	    // +  '<param name="bgcolor" value="#ffffff" />'
	    +  '<param name="menu" value="false" />'
	    +  '<param name="wmode" value="transparent" />'
	    + '<embed src="' + sPath + 'flash/simple_hdr.swf" '
		+  'FlashVars="heading=' + psHeading + '"'
	    +  'quality="high" '
	    // +  'bgcolor="#ffffff" '
	    +  'menu="false" '
	    +  'wmode="transparent" '
	    +  'width="690" '
	    +  'height="184" '
	    +  'name="' + sPath + 'flash/simple_hdr" '
	    +  'align="middle" '
	    +  'allowScriptAccess="sameDomain" '
	    +  'type="application/x-shockwave-flash" '
	    +  'pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
	    + '</object>\n'
	    + '</noscript>\n';

		document.write(oeTags);   // embed the flash movie
	  } else {  // flash is too old or we can't detect the plugin
	    var alternateContent = 'openchapter.com left sice menu.<br>'
	  	+ 'This content requires the Macromedia Flash Player.<br>'
	   	+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	    document.write(alternateContent);  // insert non-flash content
	  }
}

function showTemplateMenu(psHeading){
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {  // if we've detected an acceptable version
	    var oeTags = '<script type="text/javascript">\n'
	    + "AC_FL_RunContent("
	    +  " 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',"
	    +  "'width','746',"
	    +  "'height','176',"
	    +  "'id','../flash/template_hdr',"
	    +  "'align','middle',"
	    +  "'src','../flash/template_hdr',"
	    +  "'quality','high',"
	    // +  "'bgcolor','#ffffff',"
	    +  "'menu','false',"
	    +  "'wmode','transparent',"
	    +  "'name','../flash/template_hdr',"
	    +  "'allowscriptaccess','sameDomain',"
	    +  "'pluginspage','http://www.macromedia.com/go/getflashplayer',"
	    +  "'FlashVars','heading=" + psHeading + "',"
	    +  "'movie','../flash/template_hdr' ); //end AC code\n"
	    + '</script>\n'
	    + '<noscript>\n'
	    + '<object '
	    +  'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
	    +  'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
	    +  'width="746" height="176" id="../flash/template_hdr" align="middle">'
	    +  '<param name="FlashVars" value="heading=' + psHeading + '" />\n'
	    +  '<param name="allowScriptAccess" value="sameDomain" />'
	    +  '<param name="movie" value="../flash/template_hdr.swf" />'
	    +  '<param name="quality" value="high" />'
	    // +  '<param name="bgcolor" value="#ffffff" />'
	    +  '<param name="menu" value="false" />'
	    +  '<param name="wmode" value="transparent" />'
	    + '<embed src="../flash/template_hdr.swf" '
		+  'FlashVars="heading=' + psHeading + '"'
	    +  'quality="high" '
	    // +  'bgcolor="#ffffff" '
	    +  'menu="false" '
	    +  'wmode="transparent" '
	    +  'width="746" '
	    +  'height="176" '
	    +  'name="../flash/template_hdr" '
	    +  'align="middle" '
	    +  'allowScriptAccess="sameDomain" '
	    +  'type="application/x-shockwave-flash" '
	    +  'pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'
	    + '</object>\n'
	    + '</noscript>\n';

		document.write(oeTags);   // embed the flash movie
	  } else {  // flash is too old or we can't detect the plugin
	    var alternateContent = 'openchapter.com left sice menu.<br>'
	  	+ 'This content requires the Macromedia Flash Player.<br>'
	   	+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	    document.write(alternateContent);  // insert non-flash content
	  }
}

