
 <script type="text/javascript">
 {literal}
  var _editor_url;
  var _editor_lang;

  // You must set _editor_url to the URL (including trailing slash) where
  // where AreaEdit is installed, it's highly recommended to use an absolute URL
  //  eg: _editor_url = "/path/to/areaedit/";
  // You may try a relative URL if you wish]
  //  eg: _editor_url = "../";

  // for this example we're using a little regular expression to find the absolute path.
  // so that this demo will work "out of the box".
  //
  // However, this means if you change the name of this page or the use this code in
  // your own page you will need to set _editor_url below.
  //
  // Please note that the value of _editor_url must contain a trailing slash.

  _editor_url  = '{/literal}{$smarty.const.SITE_URL}{literal}/includes/areaedit/';

  _editor_lang = "en";      // And the language we need to use in the editor.
{/literal}
  </script>

  <!--  load in debug trace message class -->

  <script type="text/javascript" src="{$smarty.const.SITE_URL}/includes/areaedit/ddt/ddt.js"></script>

  <script type="text/javascript">
{literal}
  // create a global debug object to track everything that happens
  // during startup.

  var startupDDT = new DDT( "startup" );

  // uncomment the following if you would like to trace out the
  // startup functions. This only works in the debugging version
  // of AreaEdit, not the runtime.
  //
  // startupDDT._ddtOn();
{/literal}
  </script>
  
  <!-- Load up the actual editor core -->

  	  <script type="text/javascript" src="{$smarty.const.SITE_URL}/includes/areaedit/htmlarea.js"></script>
  	  

  <script type="text/javascript">
  {literal}
  var areaedit_editors = null;
  var areaedit_init    = null;
  var areaedit_config  = null;
  var areaedit_plugins = null;

  startupDDT._ddt( "simple_example.html", "71", "Setting up areaedit_init()" );

  // --------------------------------------------------------------------------------

  /**
  * sample initialization function
  *
  * this is called from the body onload handler below. It sets up the configurations
  * and builds the editor.
  */

  areaedit_init = function()
  {
      // This is a workaround for a bug in MSIE that sometimes produces
      // "Operation Aborted" errors. The error comes from the fact that
      // MSIE will /sometimes/ call the onload handler before the DOM
      // heirarchy is completely built.
      //
      // So we do not run this function until the page has completely
      // loaded if we are MSIE.

      if ( HTMLArea.is_ie && document.readyState != "complete" )
      {
          setTimeout( function() { areaedit_init()}, 50 );
          return false;
      }

      startupDDT._ddt( "simple_example.html", "76", "areaedit_init called from window.onload handler for simple_example.php" );

      // Initialize the HTMLArea class. (Used to be at the bottom of htmlarea.js)

      HTMLArea.init();

      /** STEP 1 ***************************************************************
      * First, what are the plugins you will be using in the editors on this
      * page.  List all the plugins you will need, even if not all the editors
      * will use all the plugins.
      ************************************************************************/

      // a minmal list of plugins.

      var areaedit_plugins_minimal =
      [
      'ContextMenu',
	  'FullScreen',
      'ImageManager'
      ];

      // This loads the plugins. We're using a very minimal list
      // here.
      //
      // loadPlugins causes the plugin .js files (in this case content-menu.js,
      // linker.js and image-manager.js) in the "background". The second parameter
      // here is a callback that gets invoked while we're waiting for things to load,
      // which in this case just causes us to loop back to here. Once everything
      // is loaded loadPlugins() returns true and we can continue on.

      startupDDT._ddt( "simple_example.html", "92", "calling HTMLArea.loadplugins()" );

      if ( !HTMLArea.loadPlugins( areaedit_plugins_minimal, areaedit_init))
      {
          return;
      }

      /** STEP 2 ***************************************************************
      * Now, what are the names of the textareas you will be turning into
      * editors? For this example we're only loading 1 editor.
      ************************************************************************/

      areaedit_editors = [
	  {/literal}{foreach from=$FORM_ARRAY item=form_array key=key}{foreach from=$form_array item=block key=fields}{if $block.2 eq 'HTML Editor'}'{$block.0}',{/if}{/foreach}{/foreach}{literal}];

      /** STEP 3 ***************************************************************
      * We create a default configuration to be used by all the editors.
      * If you wish to configure some of the editors differently this will be
      * done in step 4.
      *
      * If you want to modify the default config you might do something like this.
      *
      *   areaedit_config = new HTMLArea.Config();
      *   areaedit_config.width  = 640;
      *   areaedit_config.height = 420;
      *
      *************************************************************************/

      startupDDT._ddt( "simple_example.html", "119", "calling HTMLArea.Config()" );

      areaedit_config = new HTMLArea.Config();

      /** STEP 3 ***************************************************************
      * We first create editors for the textareas.
      *
      * You can do this in two ways, either
      *
      *   areaedit_editors   = HTMLArea.makeEditors(areaedit_editors, areaedit_config, areaedit_plugins);
      *
      * if you want all the editor objects to use the same set of plugins, OR;
      *
      *   areaedit_editors = HTMLArea.makeEditors(areaedit_editors, areaedit_config);
      *   areaedit_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
      *   areaedit_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
      *
      * if you want to use a different set of plugins for one or more of the
      * editors.
      ************************************************************************/

      startupDDT._ddt( "simple_example.html", "140", "calling HTMLArea.makeEditors()" );

      areaedit_editors   = HTMLArea.makeEditors(areaedit_editors, areaedit_config, areaedit_plugins_minimal);

      /** STEP 4 ***************************************************************
      * If you want to change the configuration variables of any of the
      * editors,  this is the place to do that, for example you might want to
      * change the width and height of one of the editors, like this...
      *
      *   areaedit_editors.myTextArea.config.width  = 640;
      *   areaedit_editors.myTextArea.config.height = 480;
      *
      ************************************************************************/

      
      /** STEP 5 ***************************************************************
      * Finally we "start" the editors, this turns the textareas into
      * AreaEdit editors.
      ************************************************************************/

      startupDDT._ddt( "simple_example.html", "160", "calling HTMLArea.startEditors()" );

      HTMLArea.startEditors(areaedit_editors);

  }  // end of areaedit_init()

  /**
  * javascript submit handler.
  *
  * this shows how to create a javascript submit
  * button that works with the htmleditor.
  */

  var submitHandler = function(formname)
  {
      var form = document.getElementById(formname);

      // in order for the submit to work both of these methods have to be
      // called.

      form.onsubmit();
      form.submit();
  }
  window.onload = areaedit_init;
  {/literal}
  </script>




















<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="{$smarty.const.SITE_URL}/includes/ajax/ajax.js"></script>


<script language="javascript">
{literal}

/*
 * The following method returns the valid HTML Entity in case the passed character is invalid, 
 * else it returns the character itself
 */
function getInvalidCharacterReplacement(Character)
{
	 var SanitizedChar
	 var CharacterCode	=	Character.charCodeAt(0);
	 
	 switch(CharacterCode) {
		case 128: 	SanitizedChar	=	'';	break;
		case 194: 	SanitizedChar	=	'';	break;
		case 167: 	SanitizedChar	=	'';	break;
		case 231: 	SanitizedChar	=	'';	break;
		case 232: 	SanitizedChar	=	'';	break;
		case 233: 	SanitizedChar	=	'';	break;
		case 234: 	SanitizedChar	=	'';	break;
		case 235: 	SanitizedChar	=	'';	break;
		case 200: 	SanitizedChar	=	'';	break;
		case 201: 	SanitizedChar	=	'';	break;
		case 202: 	SanitizedChar	=	'';	break;
		case 203: 	SanitizedChar	=	'';	break;
		case 137: 	SanitizedChar	=	'';	break;
		case 188: 	SanitizedChar	=	'';	break;
		case 195: 	SanitizedChar	=	'';	break;
		case 133: 	SanitizedChar	=	'';	break;
		case 8226: 	SanitizedChar	=	'';	break;
		case 8216:	SanitizedChar	=	'';	break;
		case 145:	SanitizedChar	=	'';	break;
		case 8217:	SanitizedChar	=	'';	break;
		case 146:	SanitizedChar	=	'';	break;
		case 8220:	SanitizedChar	=	'';	break;
		case 147:	SanitizedChar	=	'';	break;
		case 8221:	SanitizedChar	=	'';	break;
		case 148:	SanitizedChar	=	'';	break;
		case 149:	SanitizedChar	=	'';	break;
		case 8211:	SanitizedChar	=	'';	break;
		case 150:	SanitizedChar	=	'';	break;
		case 8212:	SanitizedChar	=	'';	break;
		case 151:	SanitizedChar	=	'';	break;
		case 153:	SanitizedChar	=	'';	break;
		case 169:	SanitizedChar	=	'';	break;
		case 174:	SanitizedChar	=	'';	break;
		case 8482:	SanitizedChar	=	'';	break;
		case 8364:	SanitizedChar	=	'';	break;
		case 8240:	SanitizedChar	=	'';	break;
		case 8230:	SanitizedChar	=	'';	break;
		case 8225:	SanitizedChar	=	'';	break;
		case 8224:	SanitizedChar	=	'';	break;
		case 8222:	SanitizedChar	=	'';	break;
		case 8218:	SanitizedChar	=	'';	break;
		default:	SanitizedChar	=	Character;
	 }
	 return SanitizedChar;
}

function sanitizeInvalidCharacters(Text)
{
	var	sanituizedStr = '';
	for(i=0; i<Text.length; i++)
		sanituizedStr	=	sanituizedStr + getInvalidCharacterReplacement(Text.charAt(i));
	
	return sanituizedStr;	
}







function IsNumeric(sText)
{
	var ValidChars = "0123456789.,";
	var IsNumber=true;
	var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) { 
		Char = sText.charAt(i); 
		if(ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	return IsNumber;
}
function IsInteger(sText)
{
	var ValidChars = "0123456789";
	var IsNumber=true;
	var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) { 
		Char = sText.charAt(i); 
		if(ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	return IsNumber;
}


function checkForNumericValue(NumericFieldObj)
{
	var		status		=	true;
	NumericFieldValue	=	NumericFieldObj.value;
	status				=	IsNumeric(NumericFieldValue);
	
	if(NumericFieldValue != '') {
		if(status == false) {
		{/literal}
			alert('{$MOD_VARIABLES.MOD_JS.JS_NUMERIC_COMA}');
		{literal}	
			document.getElementById(NumericFieldObj.name).focus();
			NumericFieldObj.value = '';
		}
	}
}

function checkForIntegerValue(NumericFieldObj)
{
	var		status		=	true;
	NumericFieldValue	=	NumericFieldObj.value;
	status				=	IsInteger(NumericFieldValue);
	
	if(NumericFieldValue != '') {
		if(status == false) {
			{/literal}
			alert('{$MOD_VARIABLES.MOD_JS.JS_NUMERIC}');
			{literal}	
			document.getElementById(NumericFieldObj.name).focus();
			NumericFieldObj.value = '';
		}
	}
}




function validate_form()
{   valid = true;
 
	
    return true;
	
}
	
function showHide(element)
{
	if(document.getElementById(element).style.display == 'none') {
		document.getElementById(element).style.display = 'inline';
	} else if(document.getElementById(element).style.display == 'inline') {
		document.getElementById(element).style.display = 'none';	
	}

}

function uploadPhotos()
{
	document.frm_flyer.keyPhotographs.value='Y';
	document.frm_flyer.action='{/literal}{makeLink mod=flyer pg=admin_list}act=flyer_form&form_id={$FORM_ID}&flyer_id={$FLYER_ID}{/makeLink}{literal}';
	document.frm_flyer.submit();
}
function updateLogos()
{
	document.frm_flyer.keyLogos.value='Y';
	document.frm_flyer.action='{/literal}{makeLink mod=flyer pg=admin_list}act=logos&ftype=L&pid=179&form_id={$FORM_ID}&flyer_id={$FLYER_ID}{/makeLink}{literal}';
	document.frm_flyer.submit();
}
function addAttributes(name)
{
	//document.getElementById(name).style.display = 'none';
	var	htm	=	'<table width="600" border="0" cellspacing="0" cellpadding="0"><tr><td align="right"><span class="attribute_heading" valign="middle"> Enter Label : </span><input name="user_checkbox_label" class="attribute_heading" style="width: 150px;" type="text"></td><td valign="bottam" width="130"> <input name="btn_user_checkbox_add" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/add1.jpg" valign="bottom" /><input name="btn_user_field_cancel" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/cancel1.jpg" valign="bottom" /><input type="hidden" name="hid_checkbox_name" value="'+name+'"></td></tr></table>';
	
	document.getElementById(name+'1').innerHTML	=	htm;
}

function addFeatures(name)
{  
	document.getElementById(name).style.display = 'none';
	var	htm	=	'<table width="450" border="0" cellspacing="0" cellpadding="0"  ><tr><td align="left" valign="bottom"><span class="popup_text" style="vertical-align:bottom; "> Enter Label : </span><input name="user_field_label" class="popup_text" style="width: 150px;" type="text"> <select name="user_field_type"><option value="Text">Text</option><option value="Number">Number</option><option value="Date">Date</option></select></td><td valign="bottom" width="130"><input name="btn_user_field_add" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/add1.jpg" valign="bottom" /><input name="btn_user_field_cancel" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/cancel1.jpg" valign="bottom" /><input type="hidden" name="hid_block_name" value="'+name+'"></td></tr></table>';
	document.getElementById(name+'1').innerHTML	=	htm;
}
function addLinks(name)
{
	var cancel	=	document.getElementById(name).value; 
	document.getElementById(name).style.display = 'none';
	var	htm	=	'&nbsp;&nbsp;<span class="attribute_heading" valign="top">Enter Link Title</span>&nbsp;<span class="normal_body">(Example: My Auction, My Site, Virtual Tour)</span> <br>&nbsp;&nbsp;<input name="user_link_title" class="attribute_heading" style="width: 150px;" type="text"><br>&nbsp;&nbsp;<span class="attribute_heading" valign="top">Enter Link URL</span>&nbsp;<span class="normal_body">(Example: http://www.myauction.com)</span> <br>&nbsp;&nbsp;<input name="user_link_url" class="attribute_heading" style="width: 250px;" type="text"> <br>&nbsp;&nbsp;<input name="btn_link_add" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/add1.jpg" valign="bottom" /><input name="btn_user_field_cancel" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/cancel1.jpg" valign="bottom" />';
	document.getElementById(name+'1').innerHTML	=	htm;
}
function addDropdown(name)
{
	//alert(name);
	var a	=	"document.frm_flyer."+name;
	var y = eval(a).value;
		if(y=="xie")
		{
			document.getElementById(name).style.display = 'none';
			var	htm	=	'&nbsp;&nbsp;<table><tr><td><input name="user_dropdown" class="textbox9" style="width: 150px;" type="text" ></td><td> <input name="btn_user_dropdown" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/add1.jpg" valign="bottom" /></td><td><input name="btn_user_field_cancel" type="image" src="{/literal}{$smarty.const.SITE_URL}{literal}/templates/blue/images/cancel1.jpg" valign="bottom" /></td><input type="hidden" name="hid_dropdown" value="'+name+'"></tr></table>';
			document.getElementById(name+'1').innerHTML	=	htm;
		}
}

function templatePreview(value)
{
	
	var	imagepath	=	'{/literal}{$smarty.const.SITE_URL}/html/templates{literal}';
	var	imagename	=	imagepath + '/templ' + value + '.jpg';
	document.getElementById('previewimage').innerHTML	=	'<img src="'+ imagename +'" />';
}
function showNormal(name)
{
	alert(name);
}

//Following functions added by vimson for state and country code functionality
function changeState(SelectedCountryName,CountryName, SelectedStateName, CityName)
{
	document.getElementById('stateblock').innerHTML	=	'Loading States..';
	document.getElementById('cityblock').innerHTML	=	'Loading Cities..';
	XHRObj	=	newXMLHttpRequest();
	XHRObj.onreadystatechange = getReadyStateHandler(XHRObj, showState);
	Params	=	'CountryName=' + CountryName + '&SelectedStateName=' + SelectedStateName+ '&CityName=' + CityName+ '&SelectedCountryName='+SelectedCountryName;
	{/literal}XHRObj.open("POST", "{makeLink mod=flyer pg=admin_list}&act=loadstates{/makeLink}");{literal}
	XHRObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
	XHRObj.send(Params);
}

function showState(responseHTML)
{	
    $spliter = responseHTML.split('|');

	document.getElementById('stateblock').innerHTML	=	$spliter[0];
	document.getElementById('cityblock').innerHTML	=	$spliter[1]
}



/*Afsal */
function valiDateField(draft){
	
	var	SanitizedTitle		=	sanitizeInvalidCharacters(document.frm_flyer.title.value);
	var	SanitizedDescr		=	sanitizeInvalidCharacters(document.frm_flyer.description.value);
	
	document.frm_flyer.title.value			=	SanitizedTitle;
	document.frm_flyer.description.value	=	SanitizedDescr;
	
	
	var field = Array();
	var i =0;
	var j=0;
{/literal}

	{foreach from=$FORM_ARRAY item=form_array key=key}
		{foreach from=$form_array item=block key=fields}
		
			{if $block.7 eq 'Y'}
			field[i]= '{$block.0}';
			i++;
			{/if}
		{/foreach}
	{/foreach}
{literal}
	
	
	
	if(document.frm_flyer.title.value == ""){
		{/literal}
		alert('{$MOD_VARIABLES.MOD_JS.JS_TITLE}');
		{literal}	
		document.frm_flyer.title.focus();
		return false;
	}
	
	/*if(document.frm_flyer.contact_name.value == ""){
		{/literal}
		alert('{$MOD_VARIABLES.MOD_JS.JS_CONTACT}');
		{literal}	
		document.frm_flyer.contact_name.focus();
		return false;
	}*/
	
	
	
	
	if(document.frm_flyer.location_city.value == ""){
		{/literal}
		alert('{$MOD_VARIABLES.MOD_JS.JS_CITY}');
		{literal}	
		document.frm_flyer.location_city.focus();
		return false;
	}
	
	if(document.frm_flyer.location_country.value == "" || document.frm_flyer.location_country.value == "---Select a Country---"){
		{/literal}
		alert('{$MOD_VARIABLES.MOD_JS.JS_COUNTRY}');
		{literal}	
		document.frm_flyer.location_country.focus();
		return false;
	}
	
	if(document.frm_flyer.location_state.value == ""){
		{/literal}
		alert('{$MOD_VARIABLES.MOD_JS.JS_STATE}');
		{literal}	
		document.frm_flyer.location_state.focus();
		return false;
	}
	
	
		for(j=0;j<field.length;j++){
		
			fid = field[j];
			var aInput=document.getElementById(fid);

			if(draft == 'Y'){
			if(aInput.value == ""){
				
					document.frm_flyer.mand_req.value = "Y";
					return true;
				}
			}else{
			
				if(aInput.value == ""){
				alert("Please fill in all the mandatory fields.");
				aInput.focus();
				return false;
				
				}
			}
		}
		
		if(draft == 'Y')
		document.getElementById('btn_draft_x').value = '1'
		else
		document.getElementById('btn_publish_x').value = '1'
		
		//document.frm_flyer.submit();
		submitHandler('frm_flyer');
		}

function closePopup()
{
document.getElementById('brownPopupBoxWrap').style.display='none';
}

function add_link() 
{
	//document.getElementById('div_state1').innerHTML="Loading....";
	var req9 = newXMLHttpRequest();
	req9.onreadystatechange = getReadyStateHandler(req9, serverRese9);
	str="user_link_title="+document.getElementById('user_link_title').value+"&user_link_url="+escape(document.getElementById('user_link_url').value);
	
	{/literal}
	req9.open("POST", "{makeLink mod=flyer pg=admin_list}act=ajax_addlink&flyer_id={$FLYER_ID}{/makeLink}&"+Math.random());
	{literal}
	req9.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
	req9.send(str);
}
function serverRese9(_var) {
	document.getElementById('list_links').innerHTML=_var;
	closePopup();
}
function remove_link(linkId) 
{
	{/literal}
	var msg='{$MOD_VARIABLES.MOD_JS.JS_LINK_REMOVE}';
	{literal}
	if(confirm(msg))
	{
		var req21 = newXMLHttpRequest();
		req21.onreadystatechange = getReadyStateHandler(req21, serverRese21);
		str="linkId="+linkId;
		{/literal}
		req21.open("POST", "{makeLink mod=flyer pg=admin_list}act=ajax_removelink&flyer_id={$FLYER_ID}{/makeLink}&"+Math.random());
		{literal}
		req21.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		req21.send(str);
	}	
}
function serverRese21(_var) {

		document.getElementById('list_links').innerHTML=_var;
}






function popup_show()
{

document.getElementById('user_link_url').value=''
document.getElementById('user_link_title').value=''
document.getElementById("brownPopupBoxWrap").style.display = 'inline';

}
















function updateTemplateId(id)
{
	document.getElementById('form_template').value=id;
}
function setImgMgrHeight(h)
{
	//if(navigator.appName == "Netscape")
		//document.getElementById('flashemb').style.height=h+'px';
	//else
		//document.getElementById('flashobj').style.height=h;	
	if(navigator.appName == "Microsoft Internet Explorer"){
	 	document.getElementById('flashobj').style.height=h;	
		document.getElementById('flashobj1').style.height=h;	
	}else	{
		document.getElementById('flashemb').style.height=h+'px';
		document.getElementById('flashemb1').style.height=h+'px';
	document.getElementById('flashdiv').style.height=h+'px';
	document.getElementById('flashdiv1').style.height=h+'px';
	}

}



function setAdminImgMgrHeight(h)
{
	if(navigator.appName == "Microsoft Internet Explorer"){
	 	document.getElementById('flashobj').style.height=h;	
		document.getElementById('flashobj1').style.height=h;	
	}else	{
		document.getElementById('flashemb').style.height=h+'px';
		document.getElementById('flashemb1').style.height=h+'px';
	document.getElementById('flashdiv').style.height=h+'px';
	document.getElementById('flashdiv1').style.height=h+'px';
	}

}






function fileUploadCompleted()
{
	
}

function white_space(field)

{

     var val = (field).replace(/^\s*|\s*$/g,'');
	 return val

}

function remove_file(linkId) 
{
	
		var req21 = newXMLHttpRequest();
		req21.onreadystatechange = getReadyStateHandler(req21, serverRese22);
		str="field_id="+linkId+"&flyer_id="+{/literal}{$smarty.request.flyer_id}{literal};
		
		{/literal}
		req21.open("POST", "{makeLink mod=flyer pg=admin_list}act=ajax_remove_file{/makeLink}&"+Math.random());
		{literal}
		req21.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		req21.send(str);
}		
	
function serverRese22(_var) {
var append =	white_space(_var);
var fval = "a"+append;
var lval = "b"+append;
document.getElementById(fval).style.display='none';
document.getElementById(lval).style.display='block';
}



function remove_flash() 
{
	
		var req21 = newXMLHttpRequest();
		req21.onreadystatechange = getReadyStateHandler(req21, serverRese23);
		str="flyer_id="+{/literal}{$smarty.request.flyer_id}{literal};
		{/literal}
		req21.open("POST", "{makeLink mod=flyer pg=admin_list}act=remove_flash{/makeLink}&"+Math.random());
		{literal}
		req21.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		req21.send(str);
}		
	
function serverRese23(_var) {

  document.getElementById('flash_div_360').style.display='none';

}




function remove_logo_image() 
{
		var req21 = newXMLHttpRequest();
		req21.onreadystatechange = getReadyStateHandler(req21, serverRese32);
		str="flyer_id="+{/literal}{$smarty.request.flyer_id}{literal};
		
		{/literal}
		req21.open("POST", "{makeLink mod=flyer pg=admin_list}act=remove_logo_image{/makeLink}&"+Math.random());
		{literal}
		req21.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		req21.send(str);
}		
	
function serverRese32(_var) {

document.getElementById('logo_image_div').style.display='none';

}

























{/literal}
</script>
{if $smarty.request.pg eq 'admin_list'}
<body class="index_body">
{/if}
<form name="frm_flyer" id="frm_flyer" enctype="multipart/form-data"   method="post"   onsubmit="return validate_form();">
						
						<!-- Start  Right  Container  -->
						<div {if $smarty.request.pg eq 'admin_list'} id="innerpage_admin" {else}id="innerpage_right"{/if}>
							
							
							<!-- Start Main Container  -->
							<div class="listbox_container" >
								<div class="box_head">
									<div class="box_head_left"></div>
									<div class="box_head_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_LISTING}</div>
									<div class="box_head_right"></div>
								</div>
								
								<!-- Start Listing Wrap -->
								<div  class="main_listing">
								
								<!-- Start Top button Wrap -->
									<div style="width:755px;">								
										<div class="button_wrap02" align="right">
											<table width="225" border="0" align="right" cellpadding="0" cellspacing="0">
											
											   <tbody><tr>
												<td width="86" align="left" ></td>
												<td width="60" align="left" > <a class="button01"  onClick="return valiDateField('Y');" href="#"><span>{$MOD_VARIABLES.MOD_BUTTONS.BUTTON_DRAFT}</span></a></td>
												<td width="73" align="left" ><a class="button01" onClick="return valiDateField('N');"  href="#"><span>{$MOD_VARIABLES.MOD_BUTTONS.BUTTON_PUBLISH}</span></a></td>
											  </tr>
											  <tr>
												<td height="25" colspan="3"  class="text_small" style="text-align:right;">{$MOD_VARIABLES.MOD_LABELS.LBL_MANDATORY}</td>
											  </tr>
											</tbody></table>
										</div>
										
										
										<!-- <div class="button_wrap02" align="right">
											<table width="225" border="0" align="right" cellpadding="0" cellspacing="0">
											   <tbody><tr><input id="btn_draft_x" type="hidden" name="btn_draft_x" ><input id="btn_publish_x" type="hidden" name="btn_publish_x">
												<td width="86" align="left" ><input type="hidden" name="mand_req" value="N"></td>
												<td width="60" align="left" > <a class="button01"  onClick="return valiDateField('Y');" href="#"><span>{$MOD_VARIABLES.MOD_BUTTONS.BUTTON_DRAFT}</span></a></td>
												<td width="73" align="left" ><a class="button01" onClick="return valiDateField('N');"  href="#"><span>{$MOD_VARIABLES.MOD_BUTTONS.BUTTON_PUBLISH}</span></a></td>
											  </tr>
											  <tr>
												<td height="25" colspan="3"  class="text_small" style="text-align:right;">{$MOD_VARIABLES.MOD_LABELS.LBL_MANDATORY}</td>
											  </tr>
											</tbody></table>
										</div> -->
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										
										<br clear="all" />
									</div>		
								<!-- End Top button Wrap   -->
								
								 
									<!-- Start Lisit section-->
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_DESCRIPTION}</div>
											<div class="box_head02_right"></div>
										</div>
										
										<div class="padding03">
										<table border="0" cellspacing="0" cellpadding="5">
										  <tr>
<input id="btn_draft_x" type="hidden" name="btn_draft_x" ><input id="btn_publish_x" type="hidden" name="btn_publish_x"><input type="hidden" name="mand_req" value="N">
						<input type="hidden" name="mand_req" value="N"><input type="hidden" name="form_template" id="form_template"  value="{$FLYER_VALUE.template_id}">
											<td align="left" valign="middle" style="width:124px;" >{$MOD_VARIABLES.MOD_LABELS.LBL_TITLE}</td>
											<td><label>
											  <input name="title" type="text" class="textbox8" value="{$FLYER_TITLE}" />
											</label></td>
										  </tr>
										  <tr>
											<td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_DESCRIPTION}</td>
											<td>
											  <textarea class="textarea" name="description" id="description"  rows="1" cols="1"   >{$FLYER_DESCRIPTION|replace:"&apos;":"'"}</textarea>
											</td>
										  </tr>
										  <!-- <tr>
											<td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_360_IMAGE} </td>
											<td><label>
											  <input type="file" name="file"  />{$MOD_VARIABLES.MOD_LABELS.LBL_FLASH_WIDTH}
											</label></td>
										  </tr> -->
										<!--   
										  <tr>
											<td align="left" valign="top"> </td>
											<td><label>{if $FLYER_VALUE.360_image neq ''}<div id="flash_div_360">
											  <a href="#" onClick="remove_flash();" class="bold_link">{$MOD_VARIABLES.MOD_LABELS.LBL_UNLINK_360_FLASH}</a>
											</label></div>{/if}</td>
										  </tr> -->
										  
										  
										  
										  
										  
										  
										  
										   <tr>
											<td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_LOGO_IMAGE} </td>
											<td><label>
											  <input type="file" name="logo_image"  />
											</label></td>
										  </tr>
										  <tr>
											<td align="left" valign="top"></td>
											<td><label>{if $FLYER_VALUE.logo_image neq ''}
											<div id="logo_image_div">
											<table><tr><td><img src="{$smarty.const.SITE_URL}/modules/flyer/images/logo/thumb/{$FLYER_VALUE.logo_image}"></td><td style="vertical-align:bottom; "><a href="#" onClick="remove_logo_image();" class="bold_link">{$MOD_VARIABLES.MOD_LABELS.LBL_UNLINK_LOGO_IMAGE} </a></td></tr></table>
											</div>
											{/if}
											
											  
											</label></td>
										  </tr>
									  </table>
									</div>
										
										<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->
									
									
									<!-- Start Lisit section-->
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_CONTACT}</div>
											<div class="box_head02_right"></div>
										</div>
										
										<div class="padding03">
										<table border="0" cellspacing="0" cellpadding="5">
										  <tr>
											<td align="left" valign="middle" style="width:124px;">{$MOD_VARIABLES.MOD_LABELS.LBL_NAME}</td>
											<td><label>
											  <input name="contact_name" type="text" class="textbox8" value="{$FLYER_VALUE.contact_name}"  />
											</label></td>
										  </tr>
										  <tr>
											<td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_PHONE}</td>
											<td><label>
											  <input name="contact_phone" type="text" class="textbox8" value="{$FLYER_VALUE.contact_phone}" />
											</label></td>
										  </tr>
										  <tr>
											<td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_ENAIL_ADDR}</td>
											<td><label>
											  <input name="contact_email" type="text" class="textbox8" value="{$FLYER_VALUE.contact_email}"  />
											</label></td>
										  </tr>
										  <tr>
										    <td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_FAX}</td>
										    <td><input name="contact_fax" type="text" class="textbox8" value="{$FLYER_VALUE.contact_fax}" /></td>
									      </tr>
									  </table>
									</div>
										
										<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->
									
									
									{foreach from=$FORM_ARRAY item=form_array key=key}
	                                {assign var="feature_flag" value="0"}
									
									
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div  class="box_head02_bg">{$key}</div>
											<div class="box_head02_right"></div>
											<div class="list_menu" ><!-- <a href="{if $feature_flag eq '0' }javascript: addFeatures('{$key}');{else}javascript: addAttributes('{$fields}');{/if}" >Add Custom {$key}</a> --></div>
												<div id="{$key}1" align="right" ></div>
										</div>
										<span id="{$key}" align="center"  ></span>
										
										<div class="padding03">
					<table  border="0" cellpadding="0" cellspacing="0"> 
		               <tr align="left">
								{assign var="col" value="1"}
								{assign var="split" value="2"}
								{foreach from=$form_array item=block key=fields}
								{if $col%$split eq 0 and $block.2 eq 'HTML Editor'}<td></td></tr><tr align="left">{/if}
			           <td class="normal_body" valign="top" {if $block.2 eq 'HTML Editor'} colspan="2"{/if}>
			           {if $block.1 eq 'F'}
					     <table  border="0" cellpadding="5" cellspacing="0"><tr><td style="width:41% "  valign="top">{$fields}:{if $block.7 eq 'Y'}<span style="color:#FF0000;">*</span> </td>{/if}<br>
							{if $block.2 eq 'Multiline Text'}
							{assign var="split" value="2"}
							<td valign="top" nowrap><textarea name="{$block.0}"  style="width:200px" class="textarea_list" cols="30" rows="5" id="{$block.0}">{$block.4}</textarea></td>
							{elseif $block.2 eq 'File Browser'}
							{assign var="split" value="2"}
							<td valign="top" nowrap><input type='hidden' name="{$block.0}" value="file"><div id="b{$block.0}" {if $block.4 eq '' or $block.4 eq 'file'} style="display:inline; "{else}style="display:none; "{/if} ><input type=file name="{$block.0}"  style="width:200px"   id="{$block.0}"></div><div id="a{$block.0}" {if $block.4 neq '' and $block.4 neq 'file'} style="display:inline;" {else} style="display:none; "{/if} ><a href="#" class="bold_link" onClick="remove_file('{$block.0}')"  >Unlink File</a></div></td>
							
							{elseif $block.2 eq 'HTML Editor'}
							
							{assign var="split" value="2"}
							<td valign="top" nowrap ><table><tr><td><input type="text" name="title_{$block.0}"  id="title_{$block.0}" style="width:545px; " class="textbox8" ></td></tr>
							<tr><td><textarea name="{$block.0}"  id="{$block.0}" >{$block.4}</textarea></td></tr>
							</table></td>
							
							{elseif $block.2 eq 'Dropdown'}
							{assign var="split" value="2"} 
							<div id="d{$block.0}">
							 <td valign="top"><select name="d{$block.0}" id="{$block.0}" class="list_box3"   {if $smarty.request.pg eq 'admin_list'} style="width:200px" {else}style="width:210px" {/if} onChange="javascript: addDropdown('d{$block.0}');">
							 <option value=""></option>
							{html_options values=$block.3 output=$block.3 selected=$block.4}
								{if $block.8 eq 'N'}<option  onClick="javascript: addDropdown('{$block.0}');"   class="bluetext" value="xie">Add New</option>{/if}
							 </select></td>
							</div> 
							<div id="d{$block.0}1" ></div>
							 
							{elseif $block.2 eq 'Number'} 
							{assign var="split" value="2"}
							<td valign="top"><input type="text" class="textbox9"  name="{$block.0}" id="{$block.0}" size="20" value="{$block.4}" onBlur="checkForNumericValue(this);"></td>
							{elseif $block.2 eq 'Integer'}
							{assign var="split" value="2"} 
							<td valign="top"><input type="text" class="textbox9"  name="{$block.0}" id="{$block.0}" size="20" value="{$block.4}" onBlur="checkForIntegerValue(this);"></td>
							{elseif $block.2 eq 'Date'} 
							{assign var="split" value="2"}
							<td valign="top"><input name="{$block.0}" class="textbox9"  type="text"  id="{$block.0}" value="{$block.4}" size="20" /></td>
							{else} 
							{assign var="split" value="2"}
							<td valign="top"><input type="text" class="textbox9"  name="{$block.0}" id="{$block.0}" size="20" value="{$block.4}"></td>
							{/if}
							
							{if $block.6 eq 'C'}
							<td valign="top"> <a href="{makeLink mod=flyer pg=list}act=delete_custome&form_id={$FORM_ID}&field_id={$block.0}&flyer_id={$FLYER_ID}{/makeLink}"><img src="{$GLOBAL.tpl_url}/images/Feature_del.gif" border="0" align="bottom"/></a></td>
							{/if} 
							</tr>
						</table>
					
      		          {/if}	
					</td>
					{if $block.2 eq 'HTML Editor'}
					 </tr>	<tr>		
			  {elseif $col%$split eq 0}
			  		  </tr>	<tr>			
			  {/if}
			  
			{assign var="col" value="`$col+1`"}
			
			
			<!-- ************ CHECK BOX SECTION *************** -->
			  {if $block.1 eq 'A'}
			 <tr>
				<td colspan="8" class="normal_body">
				
				
				
				
				 <div id="{$fields}" class="box_head02">
											<div class="box_head02_left"></div>
											<div  class="box_head02_bg">{$fields}</div>
											<div class="box_head02_right" id="{$key}1"></div>
											<div  id="{$fields}1" class="list_menu"  ><a href="javascript: addAttributes('{$fields}');" class="list_menu" >Add &nbsp;{$fields}</a><!-- <a href="{if $feature_flag eq '0' }javascript: addFeatures('{$key}');{else}javascript: addAttributes('{$fields}');{/if}" >Add Custom {$key}</a> --></div>
												
										</div>
				 
					<table width="100%"  border="0" cellspacing="0" cellpadding="0">
					<tr>
					{assign var="feature_flag" value="1"}
					{assign var="col2" value="1"} 
					{foreach from=$block.3 item=checkfield key=k}
						{assign var="check_flag" value=""} 
						{foreach from=$CHECKBOX_VALUE item=mycheckbox}
							{foreach from=$mycheckbox item=checkboxitem}
						 		{if $checkboxitem eq $k }
								{assign var="check_flag" value="checked"} 
								{/if}
							{/foreach}
						{/foreach}
					
					<td width="25%" style="padding-left:15px; ">
					<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" style="width:25px; " ><input name="{$k}" type="checkbox" value="1" {$check_flag}  class="checkbox01"></td>
    <td align="left"> {$checkfield}</td>
  </tr>
</table>

										</td>
					{if $col2%3 eq 0}					</tr><tr><td>&nbsp;</td></tr><tr>
					{/if}
					{assign var="col2" value="`$col2+1`"} 
					{/foreach}
					</tr>
					</table> 
				 
				   <br>
				  
				
				
				</td>
			</tr>
			
			
			 {/if} 
			<!-- ************ CHECK BOX SECTION *************** -->
			
			
			
		{/foreach}
		
		
		</tr>
	  </table>
									</div>										
										<div class="line_bg3"></div>	
									</div>
									
									{/foreach}
									
									
									
									<!-- Start Lisit section-->
									 <div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">Location Information</div>
											<div class="box_head02_right"></div>
											
										</div> 
										
									  <div class="padding03">
									    <table  border="0" cellpadding="5" cellspacing="0">
                                          <tr>
                                            <td style="width:124px; "  align="left" valign="middle" style="width:124px;">{$MOD_VARIABLES.MOD_LABELS.LBL_STREET_ADDR}</td>
                                            <td ><label>
                                              <input name="location_street_address" type="text" class="textbox8" value="{$FLYER_VALUE.location_street_address}" />
                                            </label></td>
                                          </tr>
                                          
                                          <tr>
                                            <td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_COUNTRY}</td>
                                            <td><table  border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td ><label>
                                                
												
											 {assign var="user_country" value=$FLYER_VALUE.location_country}
											{if $FLYER_VALUE.location_country eq ''}
											{assign var = "user_country" value ="CANADA"}
											{/if}
											<!-- <input type="text" name="location_country" size="35" value="{$FLYER_VALUE.location_country}"> -->
											<select name="location_country" class="list_box3" id="location_country" style="width:135px;" onChange="changeState('{$user_country}',this.value, '{$FLYER_VALUE.location_state}','{$FLYER_VALUE.location_city}')">
												<option>---Select a Country---</option>
														{html_options values=$COUNTRY_LIST.country_name output=$COUNTRY_LIST.country_name selected=$user_country}
											</select>
                                                </label></td>
                                                <td >{$MOD_VARIABLES.MOD_LABELS.LBL_STATE}</td>
                                                <td ><span  id="stateblock" ><select name="location_state" class="list_box3">
                                                  <option>---Select a Country---</option>
                                                </select></span></td>
                                              </tr>
                                            </table>
											</td>
                                          </tr>
										  <tr>
                                            <td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_CITY}</td>
                                            <td><label><span id="cityblock">
                                              <select name="location_city" class="list_box3" id="location_city" style="width:135px;" >
												<option>---Select a City---</option>
														{html_options values=$CITY_LIST.name output=$CITY_LIST.name selected=$smarty.session.city_id}
												{foreach from=$CITY_LIST item=city_val key=fields}		
													<option value="{$city_val.id}" {if $city_val.id eq $smarty.session.city_id}selected{/if}>{$city_val.name}</option>	
												{/foreach}
											</select></span>
                                            </label></td>
                                          </tr>
										  <tr>
                                            <td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_LOCATION_AREA}</td>
                                            <td><input name="location_area" type="text" class="textbox9" value="{$FLYER_VALUE.location_area}" /></td>
                                          </tr>
                                          <tr>
                                            <td align="left" valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_ZIP}</td>
                                            <td><input name="location_zip" type="text" class="textbox9" value="{$FLYER_VALUE.location_zip}" /></td>
                                          </tr>
                                        </table>
									  </div>
									<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->
									
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_SHOW_HIDE}</div>
											<div class="box_head02_right"></div>
											
										</div> 
									
									
									<div class="padding03">
									    <table width="650" border="0" cellpadding="5" cellspacing="0">
                                          <tr>
                                            <td  align="left" valign="middle" style="width:25px;">
													
											 <input type="checkbox" name="show_email"  value="Y" {if isset($FLYER_VALUE.show_email) && $FLYER_VALUE.show_email=='Y'} checked{/if} /></td>
                                            <td >{$MOD_VARIABLES.MOD_LABELS.SHOW_EMAIL_LISTING}
                                            
                                            </td>
											<td align="left" valign="top" style="width:25px;"><input type="checkbox" name="show_map" value="Y" {if isset($FLYER_VALUE.show_map)} {if $FLYER_VALUE.show_map=='Y'} checked{/if} {else} checked {/if} /> </td>
                                            <td>{$MOD_VARIABLES.MOD_LABELS.SHOW_MAP_LISTING}</td>
                                          </tr>
										  
										 <tr>
                                            <td  align="left" valign="middle" style="width:25px;">
													
											 <input type="checkbox" name="show_address"  value="Y" {if isset($FLYER_VALUE.show_address) && $FLYER_VALUE.show_address=='Y'} checked{/if} /></td>
                                            <td >{$MOD_VARIABLES.MOD_LABELS.SHOW_ADDRESS_LISTING}
                                            
                                            </td>
											<td align="left" valign="top" style="width:25px;"><input type="checkbox" name="show_reply" value="Y" {if isset($FLYER_VALUE.show_reply)} {if $FLYER_VALUE.show_reply=='Y'} checked{/if} {else} checked {/if} /> </td>
                                            <td>{$MOD_VARIABLES.MOD_LABELS.SHOW_REPLY_LISTING}</td>
                                          </tr> 
                                          
                                          
										  
										 
                                            
                                         
                                          
                                        </table>
									  </div>
									  </div>
									
									
									
									
									<div class="line_bg3"></div>	
									
									<!-- Start Lisit section-->
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_MANAGE_PHOTO}</div>
											<div class="box_head02_right"></div>
										</div>
										
									  <div  id="flashtd">
									  
									   <div id="flashdiv" >
											  <script language="javascript" type="text/javascript">/* <![CDATA[ */</script>
											  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="350"  id="flashobj" wmode="transparent">
												<param name="movie" value="{$smarty.const.SITE_URL}/modules/flyer/tmplateselect/imageManager.swf?clr={$THEME_DETAILS.clock_color}&fname={makeLink mod=flyer pg=admin_list url_encode=1}act=photo_list&flyer_id={$smarty.request.flyer_id}&form_id={$smarty.request.form_id}{/makeLink}">
												<param name="quality" value="high">
												 <param name="wmode" value="transparent">
												 <PARAM NAME="AllowScriptAccess" VALUE="always">
												<embed src="{$smarty.const.SITE_URL}/modules/flyer/tmplateselect/imageManager.swf?clr={$THEME_DETAILS.clock_color}&fname={makeLink mod=flyer pg=admin_list url_encode=1}act=photo_list&flyer_id={$smarty.request.flyer_id}{/makeLink}" quality="high" AllowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="350"  id="flashemb" wmode="transparent"></embed>
											  </object>
											  <script language="javascript" type="text/javascript">/* ]]> */</script>
										  
									  </div>
									  
									  
									  </div>
									  
									<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->
									
									
									<!-- Start Lisit section-->
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_MANAGE_VIDEO}</div>
											<div class="box_head02_right"></div>
										</div>
										
									  <div>
									  <div  id="flashtd">
									  
									   <div id="flashdiv1" >
											  <script language="javascript" type="text/javascript">/* <![CDATA[ */</script>
											  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="350"  id="flashobj1" wmode="transparent">
												<param name="movie" value="{$smarty.const.SITE_URL}/modules/flyer/tmplateselect/videoManager.swf?clr={$THEME_DETAILS.clock_color}&fname={makeLink mod=flyer pg=admin_list url_encode=1}act=video_list&flyer_id={$smarty.request.flyer_id}&form_id={$smarty.request.form_id}{/makeLink}">
												<param name="quality" value="high">
												 <param name="wmode" value="transparent">
												 <PARAM NAME="AllowScriptAccess" VALUE="always">
												<embed src="{$smarty.const.SITE_URL}/modules/flyer/tmplateselect/videoManager.swf?clr={$THEME_DETAILS.clock_color}&fname={makeLink mod=flyer pg=admin_list url_encode=1}act=video_list&flyer_id={$smarty.request.flyer_id}{/makeLink}" quality="high" AllowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="350"  id="flashemb1" wmode="transparent"></embed>
											  </object>
											  <script language="javascript" type="text/javascript">/* ]]> */</script>
										  
									  </div>
									  























									  




									  </div>
									  </div>
									
									<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->
									
									<!-- Start Lisit section-->
									<div class="content_box02">
										<div class="box_head02">
											<div class="box_head02_left"></div>
											<div class="box_head02_bg">{$MOD_VARIABLES.MOD_HEADS.HEAD_MANAGE_LINK}</div>
											<div class="box_head02_right"></div>
										</div>
										<div id="brownPopupBoxWrap"  style="display:none; top:300px; " >
		<!-- Brown box header : start -->
		<div id="brownPopupHeader"></div>
		<!-- Brown box header : end -->
		<!-- Brown box body : start -->
		<div id="brownPopupContentHolder">
		
			
			
			<div id="brownPopupContentRow" >
				
				
				<table width="450" border="0" align="left"  cellpadding="0" cellspacing="0">
	 <tr><td width="450" colspan="3"><table style="width:400px; "><tr>
     
    <td width="100%" align="right" ><div align="left"  id="popup_drag"   >{$MOD_VARIABLES.MOD_LABELS.LBL_ADD_LINK}</td><td><img  src="{$GLOBAL.tpl_url}/images/closebtn.jpg" onClick="javascript:closePopup();"  border="0" /><div></td>
  </tr>
  </table></td></tr>
  <td  ></td>
    <td height="2" bgcolor="#CCCCCC" style="background-image: url({$smarty.const.SITE_URL}/templates/blue/images/line1.jpg);"></td>
    <td></td>
  <tr>
    <td height="33" width="20">&nbsp;</td>
    <td align="left" width="415"><span class="popup_text"  valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_LINK_TITLE}</span>&nbsp;<span class="normal_body">{$MOD_VARIABLES.MOD_LABELS.LBL_LINK_EXAMPLE}</span> </td>
    <td width="20">&nbsp;</td>
  </tr>
  <tr>
    <td height="33">&nbsp;</td>
    <td align="left"><input name="user_link_title" id="user_link_title"  class="textbox8" style="width: 150px;" type="text"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="29">&nbsp;</td>
    <td  align="left"><span class="popup_text"  valign="top">{$MOD_VARIABLES.MOD_LABELS.LBL_LINK_URL}</span>&nbsp;<span class="normal_body">{$MOD_VARIABLES.MOD_LABELS.LBL_URL_EXAMPLE}</span></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="33">&nbsp;</td>
    <td align="left"><input name="user_link_url"   id="user_link_url" class="textbox8" style="width: 250px;" type="text"> </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="33">&nbsp;</td>
    <td align="left" ><div align="left"  id="popup_drag"  ><img name="btn_link_add" style="border:0;"  src="{$smarty.const.SITE_URL}/templates/blue/images/add1.jpg" valign="bottom" onClick="javascript:add_link();" />&nbsp;<img name="btn_user_field_cancel" style="border:0;"  src="{$smarty.const.SITE_URL}/templates/blue/images/cancel1.jpg" valign="bottom" onClick="javascript:closePopup();" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
</table>
										
				
			</div>
			<div id="brownPopupContentRow">
				<ul>
					
					<li></li>	
					<div class="clear"></div>				
				</ul>
				
			</div>
			
			
		</div>
		<!-- Brown box body : end -->
		<!-- Brown box footer : start -->
		<div id="brownPopupFooter"><!-- --></div>
		<!-- Brown box footer : end -->
	</div>
									  <div id="list_links">
										<table width="724" border="0" cellspacing="0" cellpadding="4">
										 <tr>
										   <td style="width:5px; "></td>
										   <td colspan="3" align="left"><a href="#" onClick="popup_show();return false;" class="bold_link">{$MOD_VARIABLES.MOD_LABELS.LBL_ADD_LINK} </a></td>
									      </tr>
										   {foreach from=$FLYER_LINKS item=link } 
											 {assign var="linkChecked" value=""} 
											{foreach from=$LINK_VALUE item=myLinks}
												{foreach from=$myLinks item=linkitem}
													{assign var="linkPrefix" value='L'}
													{assign var="linkName" value=$linkPrefix|cat:$link.link_id } 
													{if $linkitem eq $linkName }
														{assign var="linkChecked" value="checked"}
													{/if}
												{/foreach}
											{/foreach}
										 <tr>
										   <td width="2"></td>
										   <td width="11"><label><a href="javascript:void(0);" onClick="javascript:remove_link({$link.link_id});" ><img src="{$GLOBAL.tpl_url}/images/del_icon2.jpg" alt="" width="15" height="15" /></a></label></td>
										   <td width="18"><input type="checkbox" name="L{$link.link_id}" value="1" {$linkChecked} /></td>
										   <td width="660"><a href="{$link.link_url}" target="_blank" class="text_link4">{$link.link_title}</a> </td>
										 </tr>
										 
										{/foreach}
										
						
										</table>
									  </div>
									
									<div class="line_bg3"></div>	
									</div>
									<!-- End Lisit section -->

									
								</div>
								<!-- End Listing Wrap -->
								
								<div class="box_footer">
									<div class="box_footer_left"></div>
									<div class="box_footer_right"></div>
								</div>
								
							</div>
						 	<!-- End Main Container  -->
							
							
							
						</div>





<input type="hidden" name="keyLogos" value="N">
	<input type="hidden" name="keyPhotographs" value="N">
	<input type="hidden" name="keyAttributes" value="N">
	<input type="hidden" name="keyFeatures" value="N">
		<input type="hidden" name="flyer_id" value="{$FLYER_ID}">
		<input type="hidden" value="{$FORM_ID}" name="flyer_form_id">











						<!-- End  Right  Container  -->
						
						
					<br clear="all" />

</form>




















{if $smarty.request.pg eq 'admin_list'}

</body>
{/if}
<script language="javascript">
	//templatePreview('{$FLYER_TEMPLATE}');
	changeState('{$user_country}','{$user_country}', '{$FLYER_VALUE.location_state}','{$FLYER_VALUE.location_city}');
</script>

