<?php 



 /**

 * @package Folder Menu

 * @author Web-Dorado

 * @copyright (C) 2011 Web-Dorado. All rights reserved.

 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html

 **/

 

defined( '_JEXEC' ) or die( 'Restricted access' ); 



$rootOfMod=JURI::root(true).'/modules/mod_foldermenu/';



$menudesign=$params->get('menudesign',0);

$menufont=$params->get('menufont','arial');



if($params->get('menutype')!='')

{

	if($menudesign==0)

	{

	?>

	<div id="foldermenuverticalContainer" onmouseover="onmouseover_vertical();" onmouseout="onmouseout_vertical();" style="position:<?php echo $params->get('positionType'); ?>; left:0px; top:<?php echo $params->get('posTop'); ?>px; overflow:hidden;width:50px; height:1500px;">

	<script language="javascript">

		if (typeof(AC_FL_RunContent)=="undefined") {

			alert("This page requires AC_RunActiveContent.js.");

		} else {

			AC_FL_RunContent(

				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',

				'width', '1000',

				'height', '3000',

				'src', '<?php echo $rootOfMod; ?>swf/Vertical<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'quality', 'high',

				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

				'align', 'left',

				'play', 'true',

				'loop', 'true',

				'scale', 'showall',

				'wmode', 'transparent',

				'devicefont', 'false',

				'id', 'FolderMenuVerticalElem',

				'name', 'FolderMenuVerticalElem',

				'menu', 'true',

				'allowFullScreen', 'false',

				'allowScriptAccess','always',

				'movie', '<?php echo $rootOfMod; ?>swf/Vertical<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'salign', 't',

				'flashvars', 'xmlUrl=<?php echo $rootOfMod; ?>xml.php?module_id=<?php echo $module->id; ?>&wdrand=<?php echo mt_rand() ?>'

				);

				

		if(typeof(FolderMenuVerticalElem)=="undefined") 

			initFlash_Moz_vertical();

		else

			initFlash_vertical();

			

			}



		

	function onmouseover_vertical()

	{

	if(typeof(FolderMenuVerticalObj)!="undefined")

		{

			FolderMenuVerticalObj.TOtrigger=true;

			FolderMenuVerticalObj.setHeightAndWidthTO();

		}

	}

		

	function onmouseout_vertical()

	{

	if(typeof(FolderMenuVerticalObj)!="undefined")

		{

			FolderMenuVerticalObj.TOtrigger=false;

		}

	}

		

	function initFlash_Moz_vertical()

	{

	if(typeof(document.FolderMenuVerticalElem.getWidth)=='function')

		FolderMenuVerticalObj=new FolderMenuVertical("foldermenuverticalContainer",document.FolderMenuVerticalElem,"FolderMenuVerticalObj",initFlash_Moz_vertical);

	else {setTimeout("initFlash_Moz_vertical()",500);}

	}



	function initFlash_vertical()

	{

	if(typeof(FolderMenuVerticalElem.getWidth)=='function')

		FolderMenuVerticalObj=new FolderMenuVertical("foldermenuverticalContainer",FolderMenuVerticalElem,"FolderMenuVerticalObj",initFlash_vertical);

	else {setTimeout("initFlash_vertical()",500);}

	}

	</script>

	<noscript>



	</noscript>

	</div>

	<script language="javascript">

		var foldermenuverticalContainerDiv = document.getElementById('foldermenuverticalContainer');

		document.body.appendChild(foldermenuverticalContainerDiv);

	</script>

	<?php 

	}

	else if($menudesign==1)

	{



	?>

	<div id="foldermenuhorizontalContainer" style="overflow:hidden;width:100%; height:150px;">

	<script language="javascript">

		if (typeof(AC_FL_RunContent)=="undefined") {

			alert("This page requires AC_RunActiveContent.js.");

		} else {

			AC_FL_RunContent(

				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',

				'width', '2000',

				'height', '2000',

				'src', '<?php echo $rootOfMod; ?>swf/Horizontal<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'quality', 'high',

				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

				'align', 'left',

				'play', 'true',

				'loop', 'true',

				'scale', 'showall',

				'wmode', 'transparent',

				'devicefont', 'false',

				'id', 'FolderMenuHorizontalElem',

				'name', 'FolderMenuHorizontalElem',

				'menu', 'true',

				'allowFullScreen', 'false',

				'allowScriptAccess','always',

				'movie', '<?php echo $rootOfMod; ?>swf/Horizontal<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'salign', 't',

				'flashvars', 'xmlUrl=<?php echo $rootOfMod; ?>xml.php?module_id=<?php echo $module->id; ?>&wdrand=<?php echo mt_rand() ?>'

				);

				

		if(typeof(FolderMenuHorizontalElem)=="undefined") 

			initFlash_Moz_horizontal();

		else

			initFlash_horizontal();

			

			}



		

	function initFlash_Moz_horizontal()

	{

	if(typeof(document.FolderMenuHorizontalElem.getWidth)=='function')

		FolderMenuHorizontalObj=new FolderMenuHorizontal("foldermenuhorizontalContainer",document.FolderMenuHorizontalElem,"FolderMenuHorizontalObj",initFlash_Moz_horizontal);

	else {setTimeout("initFlash_Moz_horizontal()",500);}

	}



	function initFlash_horizontal()

	{

	if(typeof(FolderMenuHorizontalElem.getWidth)=='function')

		FolderMenuHorizontalObj=new FolderMenuHorizontal("foldermenuhorizontalContainer",FolderMenuHorizontalElem,"FolderMenuHorizontalObj",initFlash_horizontal);

	else {setTimeout("initFlash_horizontal()",500);}

	}

	</script>

	<noscript>



	</noscript>

	</div>

	<?php 

	}

	else if($menudesign==2)

	{

	?>

	<div style="width:100%; height:160px;" id="foldermenudropdownParentDiv">

	<div id="foldermenudropdownContainer" onmouseover="onmouseover_dropdown();" onmouseout="onmouseout_dropdown();" style="position:absolute;overflow:hidden; height:160px;">

	<script language="javascript">

		if (typeof(AC_FL_RunContent)=="undefined") {

			alert("This page requires AC_RunActiveContent.js.");

		} else {

			AC_FL_RunContent(

				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',

				'width', '2000',

				'height', '3000',

				'src', '<?php echo $rootOfMod; ?>swf/DropDown<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'quality', 'high',

				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

				'align', 'left',

				'play', 'true',

				'loop', 'true',

				'scale', 'showall',

				'wmode', 'transparent',

				'devicefont', 'false',

				'id', 'FolderMenuDropDownElem',

				'name', 'FolderMenuDropDownElem',

				'menu', 'true',

				'allowFullScreen', 'false',

				'allowScriptAccess','always',

				'movie', '<?php echo $rootOfMod; ?>swf/DropDown<?php echo $menufont; ?>?wdrand=<?php echo mt_rand() ?>',

				'salign', 't',

				'flashvars', 'xmlUrl=<?php echo $rootOfMod; ?>xml.php?module_id=<?php echo $module->id; ?>&wdrand=<?php echo mt_rand() ?>'

				);

				

		if(typeof(FolderMenuDropDownElem)=="undefined") 

			initFlash_Moz_dropdown();

		else

			initFlash_dropdown();



			}



		

	function onmouseover_dropdown()

	{

	if(typeof(FolderMenuDropDownObj)!="undefined")

		{

			FolderMenuDropDownObj.TOtrigger=true;

			FolderMenuDropDownObj.setHeightAndWidthTO();

		}

	}

		

	function onmouseout_dropdown()

	{

	if(typeof(FolderMenuDropDownObj)!="undefined")

		{

			FolderMenuDropDownObj.TOtrigger=false;

		}

	}

		

	function initFlash_Moz_dropdown()

	{

	if(typeof(document.FolderMenuDropDownElem.getWidth)=='function')

		FolderMenuDropDownObj=new FolderMenuDropDown("foldermenudropdownContainer",document.FolderMenuDropDownElem,"FolderMenuDropDownObj","foldermenudropdownParentDiv",initFlash_Moz_dropdown);

	else {setTimeout("initFlash_Moz_dropdown()",500);}

	}



	function initFlash_dropdown()

	{

	if(typeof(FolderMenuDropDownElem.getWidth)=='function')

		FolderMenuDropDownObj=new FolderMenuDropDown("foldermenudropdownContainer",FolderMenuDropDownElem,"FolderMenuDropDownObj","foldermenudropdownParentDiv",initFlash_dropdown);

	else {setTimeout("initFlash_dropdown()",500);}

	}

	</script>

	<noscript>



	</noscript>

	</div>

	</div>

	<script language="javascript">

		var foldermenuDropDownContainerDiv = document.getElementById('foldermenudropdownContainer');

		document.body.appendChild(foldermenuDropDownContainerDiv);	

	</script>

	<?php 

	}

}

 ?>