 <div class="form-group" id="domain_list"<? if($poral_setting['vis_satellite_helpdesk'] == 3) echo ' style="display:none;"';?>>
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTDOMAIN']; ?></label>
               <div class="col-sm-10">
                  <select name="vis_domain" id="vis_domain" onchange="$('#vis_portal_setting_div').visExecution('load_area',{'vis_module':'setting', 'vis_operation':'portal_setting', 'vis_domain_id':$(this).val(), 'vis_satellite_helpdesk':$('input:radio[name=vis_satellite_helpdesk]:checked').val()}); " class="form-control input-sm selectpicker" <? if(count($domain)>10) echo 'data-live-search="true"';?>>
				<?php for($i=0;$i<count($domain);$i++)
				echo '<option value="'.$domain[$i]['domain_id'].'"'.($domain[$i]['domain_id']==$operation['vis_domain_id']?' selected="selected"':'').'>'.$domain[$i]['domain_name'].'</option>'; ?>
                  </select>
               </div>
            </div>
			

            
           
            
   
			<div class="form-group">
			<label class="col-sm-2 control-label"><? echo $vis_language['TXTPORTALLOGO']; ?></label>
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="radio i-checks pull-left">
					  <label>
						<input type="radio" value="image" name="vis_logo" onclick="toggle_logo(this);" <? if($poral_setting['vis_manage_logo']=='image') echo 'checked="checked"'; ?>><i></i><?= $vis_language['TXTIMG'];?>
					  </label>
					</div>
				</div>
				<div class="col-sm-2">
					<div class="radio i-checks m-l-xl">
					  <label>
						<input type="radio" value="text" name="vis_logo" onclick="toggle_logo(this);" <? if($poral_setting['vis_manage_logo']=='text') echo 'checked="checked"'; ?>><i></i><?= $vis_language['TXTTEXT'];?>
					  </label>
					</div>
				</div>
			</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label" id="image_logo" <?echo ((isset($poral_setting['vis_manage_logo'])) && $poral_setting['vis_manage_logo']=='image')?'style="display:"':'style="display:none"'; ?>></label>
				<label class="col-sm-2 control-label" id="text_logo" <?echo ((isset($poral_setting['vis_manage_logo'])) && $poral_setting['vis_manage_logo']=='text')?'style="display:"':'style="display:none"'; ?>><? echo $vis_language['TXTENTTXTLOGO']; ?></label>
				<div class="col-sm-10">
					<span id="vis_logo_image" class="m-l-xl" <? echo ($poral_setting['vis_manage_logo']=='image')?'style="display:"':'style="display:none"'; ?>>
					<span id="vis_manage_logo" class="pull-left m-r-xl"><img height="80" src="<? echo (isset($poral_setting['vis_portal_logo']) && $poral_setting['vis_portal_logo']!='image')?(VIS_PATH_PROFILE.$poral_setting['vis_portal_logo']):(VIS_PATH_IMAGES.'vh-logo.svg?ver=02122014'); ?>" /></span>
					<span id="vis_portal_logo" class="pull-left m-t-md">
						<input type="file" name=vis_portal_img class="filestyle" data-icon="false" data-classButton="btn btn-link link m-t-xs" data-buttonText="<? echo $vis_language['TXTUPLOADIMG']; ?>" data-input="false" onchange="$(this).visExecution('upload_file', {'vis_static_area':'#vis_profile_image', 'vis_form':'vis_portal_setting', 'vis_upload_area':'#vis_portal_logo', 'vis_action':'index.php?vis_module=setting&vis_operation=upload_logo'})">
					</span>
					<span id="clear_client_logo_Img">
					<? if(isset($poral_setting['vis_portal_logo']) && $poral_setting['vis_portal_logo']!='image') {?>
						<button type="button" id="clear_client_logo_Btn" class="btn btn-primary btn-xs pull-left m-t-lg" onclick="javascript:clear_logo();"><? echo $vis_language['TXTCLEAR']; ?></button>
					<? }?>
				</span>
					</span>
				 	<span id="vis_logo_text"  <? echo ($poral_setting['vis_manage_logo']=='text')?'style="display:"':'style="display:none"'; ?>>
						<div class="row">
						  <div class="col-sm-9">
							<input class="form-control input-sm" id="logo_text" name="logo_text" value="<?= $poral_setting['vis_portal_text']; ?>" type="text">
						  </div>
						  <div class="col-sm-3">
							<div class="input-group">
								<input class="form-control input-sm demo-auto" placeholder="Text color" name="logo_text_colour" type="text" value="<?= $poral_setting['vis_portal_text_colour'];?>">
								<span class="input-group-addon input-sm">
									<label class="i-checks m-b-n m-l-xs">
										<input type="checkbox" name="logo_text_bold"<? if($poral_setting['vis_portal_text_bold'] == 1) echo ' checked="checked"';?>><i></i> Bold
									</label>
								</span>
								<span class="input-group-addon input-sm">
									<label class="i-checks m-b-n m-l-xs">
										<input type="checkbox" name="logo_text_italic"<? if($poral_setting['vis_portal_text_italic'] == 1) echo ' checked="checked"';?>><i></i> Italic
									</label>
								</span>
							</div>
						  </div>
						</div>
					</span>
					<input type="hidden" name="vis_location" value="<?= VIS_DOMAIN; ?>" />

				</div>
			</div>
			<div class="form-group">

				<label class="col-sm-2 control-label"><? echo $vis_language['TXTFAVICON']; ?></label>
			<div class="col-sm-10">
					
					<span id="vis_favicon_img" class="pull-left m-r-xl"><img height="30" src="<? echo (isset($poral_setting['vis_favicon']) && $poral_setting['vis_favicon']!='image')?(VIS_PATH_PROFILE.$poral_setting['vis_favicon']):(VIS_PATH_IMAGES.'favicon.ico'); ?>" /></span>
					<span id="vis_favicon" class="pull-left">
						<input type="file" name="vis_favicon_portal_img" class="filestyle" data-icon="false" data-classButton="btn btn-link link" data-buttonText="<? echo $vis_language['TXTUPLOADIMG']; ?>" data-input="false" onchange="$(this).visExecution('upload_file', { 'vis_form':'vis_portal_setting', 'vis_upload_area':'#vis_favicon', 'portal': 'favicon','vis_action':'index.php?vis_module=setting&vis_operation=upload_logo&portal=favicon'})">
					</span>
					<span id="clear_client_favicon_Img">
					<? if(isset($poral_setting['vis_favicon']) && $poral_setting['vis_favicon']!='image') {?>
						<button type="button" id="clear_client_favicon_Btn" class="btn btn-primary btn-xs pull-left" onclick="javascript:clear_favicon();"><? echo $vis_language['TXTCLEAR']; ?></button>
					<? }?>
				</span>
				</div>
				</div>
			
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTTHEME']; //echo $vis_language['TXTPORTALCOLOR']; ?></label>
               <div class="col-sm-10">
                  <input  class="form-control input-sm demo-auto" name="vis_portal_color" id="vis_portal_color_area" type="text" value="<?= $poral_setting['theme_color']?>">
               </div>
            </div>
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTTEMPLATE']; //$vis_language['TXTCLIENTPORTALTHEME'] ?></label>
               <div class="col-sm-10">
                  <select class="form-control input-sm selectpicker" name="vis_theme">
				  <? for($i=0;$i<count($themes);$i++) echo '<option value="'.$themes[$i].'"'.(($themes[$i]==$domain_details['theme'])?' selected="selected"':'').'>'.$themes[$i].'</option>'; ?></select>
               </div>
            </div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTDATEFORMAT']; ?></label>
				<div class="col-sm-10">
					<input class="form-control input-sm" type="text" name="vis_date_format" id="vis_date_format" value="<? if($poral_setting['vis_date_format']==''){ echo VIS_DATE_FORMAT;} else echo $poral_setting['vis_date_format']; ?>" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTDATETIMEFORMAT']; ?></label>
				<div class="col-sm-10">
    <? $dtformat=array("M-jS, Y G:i","js-M, Y G:i","M-jS, Y g:i","M-jS, Y h:i:s","m-jS, Y g:i","d-m-Y h:i","d-m-Y h:i:s","D-m-Y h:i","D-m-Y h:i:s");
			$datetimeformat=(isset($poral_setting['vis_datetime_format']) && $poral_setting['vis_datetime_format']!='')?$poral_setting['vis_datetime_format']:'M-jS, Y G:i';
			if(!in_array($datetimeformat,$dtformat)){$customselected='selected="selected"'; $showcustom='show';}else{$showcustom='hide';}
			 ?>
    
     <select name="vis_datetime_format" id="vis_datetime_format" class="form-control input-sm selectpicker" onchange="showcustomdatetime(this.value);">
   <? for($c=0; $c<count($dtformat); $c++){?>
   <? if($dtformat[$c]==$datetimeformat){?>
   <option value="<?php echo $dtformat[$c];?>" selected="selected"><?php echo $dtformat[$c];?></option>
   <?php }else{?>
   <option value="<?php echo $dtformat[$c];?>"><?php echo $dtformat[$c];?></option>
   <? }}?>
   <option value="custom" <?=$customselected?>>Custom</option>
   </select>
   <div id="customdtm" class="m-t-sm <?php echo $showcustom;?>">
				<input class="form-control input-sm" type="text" name="vis_cdatetime_format" id="vis_cdatetime_format" value="<? echo $datetimeformat;?>">
    </div>
    
				
				</div>
			</div>
			<div class="form-group">
				  <label class="col-sm-2 text-right"><? echo $vis_language['TXTTIMEZONE']; ?></label>
				  <div class="col-sm-10">
				  <span id="vis_staff_timezone_value"><? echo "GMT".calulate_timezone($domain_details['timezone']); ?> <span class="vis_button label vh-success-bg m vis-pointer" onclick="$('#vis_staff_timezone_setting').toggle(); $('#vis_staff_timezone_value').toggle(); $('#vis_change_timezone').val(1); "><? echo $vis_language['TXTCHANGE']; ?></span></span><span id="vis_staff_timezone_setting" style="display:none">
					  <select name="vis_timezone" id="vis_timezone" class='form-control input-sm selectpicker' data-live-search="true">
								<option value="-12:00#International Date Line West#0">(GMT-12:00) International Date Line West</option>
				<option value="-11:00# Midway, Niue, Pago Pago#0" <?php ?>>(GMT-11:00)Midway, Niue, Pago Pago</option>
				<option value="-10:00#Fakaofo, Hawaii Time, Rarotonga, Tahiti#0">(GMT-10:00) Hawaii Time, Rarotonga, Tahiti</option>
				<option value="-9:30#Marquesas#0">(GMT-09:30) Marquesas</option>
				<option value="-9:00#Gambier#0">(GMT-09:00) Gambier</option>
				<option value="-8:00#Pacific Time, Tijuana, Vancouver, Whitehorse#1">(GMT-08:00) Pacific Time, Tijuana, Vancouver, Whitehorse</option>
				<option value="-8:00#Pitcairn#0">(GMT-08:00) Pitcairn</option>
				<option value="-7:00#Mountain Time, Edmonton, Yellowknife,Chihuahua,Mazatlan#1">(GMT-07:00) Mountain Time, Edmonton, Yellowknife,Chihuahua,Mazatlan</option>
				<option value="-7:00#Dawson Creek, Hermosillo, Arizona#0">(GMT-07:00) Dawson Creek, Hermosillo, Arizona</option>
				<option value="-6:00#Belize, Central Time, Regina, Winnipeg, Costa Rica,El Salvador,Galapagos, Guatemala, Managua#0">(GMT-06:00) Belize, Central Time, Regina, Winnipeg, Costa Rica,El Salvador,Galapagos, Guatemala, Managua</option>
				<option value="-6:00#Johnston,Mexico City,Winnipeg,Easter Island#1">(GMT-06:00)Johnston,Mexico City,Winnipeg,Easter Island</option>
				<option value="-5:00#Bogota, Cayman, Guayaquil, Jamaica, Lima,Panama, Port-au-Prince, Rio Branco#0">(GMT-05:00) Bogota, Cayman, Guayaquil, Jamaica, Lima,Panama, Port-au-Prince, Rio Branco</option>
				<option value="-5:00#Eastern Time, Iqaluit, Montreal, Toronto, Grand Turk, Havana, Nassau#1">(GMT-05:00) Eastern Time, Iqaluit, Montreal, Toronto, Grand Turk, Havana, Nassau</option>
				<option value="-4:00#Caracas, Anguilla, Antigua, Aruba,Atlantic Time - Halifax, Barbados,Boa Vista#0">(GMT-04:00) Caracas, Anguilla, Antigua, Aruba,Atlantic Time - Halifax, Barbados,Boa Vista </option>
				<option value="-4:00#Asuncion,Bermuda, Santiago, Thule#1">(GMT-04:00) Asuncion,Bermuda, Santiago, Thule</option>
				<option value="-4:00#Campo Grande, Cuiaba, Curacao, Dominica, Grenada, Guadeloupe, Guyana, La Paz, Manaus, St. Lucia, St. Thomas,St. Vincent#0">(GMT-04:00) Campo Grande, Cuiaba, Curacao, Dominica, Grenada, Guadeloupe, Guyana, La Paz, Manaus, St. Lucia, St. Thomas,St. Vincent</option>
				<option value="-4:00#Martinique, Montserrat, Port of Spain, Porto Velho, Puerto Rico,Santo Domingo,St. Kitts,Tortola#0">(GMT-04:00) Martinique, Montserrat, Port of Spain, Porto Velho, Puerto Rico,Santo Domingo,St. Kitts,Tortola</option>
				<option value="-3:30#Newfoundland Time - St. Johns#1">(GMT-03:30) Newfoundland Time - St. Johns</option>
				<option value="-3:00#Belem, Buenos Aires, Cayenne, Fortaleza, Godthab, Maceio, Salvador#0">(GMT-03:00) Belem, Buenos Aires, Cayenne, Fortaleza, Godthab, Maceio, Salvador</option>
				<option value="-3:00#Montevideo, Paramaribo, Recife, Rothera,Stanley,Araguaina#0">(GMT-03:00)  Montevideo, Paramaribo, Recife, Rothera,Stanley,Araguaina</option>
				<option value="-3:00#Sao Paulo#1">(GMT-03:00) Sao Paulo</option>
				<option value="-2:00#Noronha, South Georgia#0">(GMT-02:00) Noronha, South Georgia</option>
				<option value="-1:00#Azores, Scoresbysund#1">(GMT-01:00) Azores, Scoresbysund</option>
				<option value="-1:00#Cape Verde#0">(GMT-01:00) Cape Verde</option>
				<option value="+0:00#Abidjan, Accra, Bamako, Banjul, Bissau,Lome, Freetown,Danmarkshavn Dakar#0">(GMT+00:00) Abidjan, Accra, Bamako, Banjul, Bissau, Conakry,Lome, Freetown,Danmarkshavn ,Dakar</option>
				<option value="+0:00# Monrovia, Nouakchott, Ouagadougou, Reykjavik, Sao Tome, St Helena#0">(GMT+00:00)  Monrovia, Nouakchott, Ouagadougou, Reykjavik, Sao Tome, St Helena</option>
				<option value="+0:00#London, Canary Islands, Ireland, Casablanca, Dublin, El Aaiun, Faeroe, Lisbon#1">(GMT+00:00) London, Canary Islands, Ireland, Casablanca, Dublin, El Aaiun, Faeroe, Lisbon</option>
				<option value="+1:00#Amsterdam, Andorra, Berlin, Brussels, Budapest, Ceuta, Copenhagen, Gibraltar,Luxembourg#1">(GMT+01:00)Amsterdam, Andorra, Berlin, Brussels, Budapest, Ceuta, Copenhagen, Gibraltar,Luxembourg</option>
				<option value="+1:00#Madrid , Malta, Monaco, Oslo,Paris, Rome ,Stockholm, Tirane, Vaduz, Vienna, Warsaw, Windhoek, Zurich#1">(GMT+01:00) Madrid , Malta, Monaco, Oslo,Paris, Rome ,Stockholm, Tirane, Vaduz, Vienna, Warsaw, Windhoek, Zurich </option>
				<option value="+1:00#Algiers, Bangui, Brazzaville, Central European Time, Douala, Kinshasa, Lagos, Libreville#0">(GMT+01:00)Algiers, Bangui, Brazzaville, Central European Time, Douala, Kinshasa, Lagos, Libreville</option>				
				<option value="+1:00# Luanda,Malabo, Ndjamena, Niamey, Porto-Novo, Tunis#0">(GMT+01:00)  Luanda,Malabo, Ndjamena, Niamey, Porto-Novo, Tunis</option>
				<option value="+2:00#Amman, Athens,, Beirut, Bucharest, Chisinau, Damascus, Gaza, Helsinki, Istanbul, Jerusalem#1">(GMT+02:00) Amman, Athens, Beirut, Bucharest, Chisinau, Damascus, Gaza, Helsinki, Istanbul, Jerusalem</option>
				<option value="+2:00# Kiev, Minsk, Nicosia, Riga, Sofia, Tallinn, Vilnius#1">(GMT+02:00) Kiev, Minsk, Nicosia, Riga, Sofia, Tallinn, Vilnius</option>
				<option value="+2:00#  Blantyre, Bujumbura, Cairo, Gaborone,Harare,Johannesburg,Kigali,Lubumbashi,Lusaka,Maputo,Maseru,Mbabane,Moscow-01 - Kaliningrad,Tripoli#0">(GMT+02:00)  Blantyre, Bujumbura, Cairo, Gaborone,Harare,Johannesburg,Kigali,Lubumbashi,Lusaka,Maputo,Maseru,Mbabane,Moscow-01 - Kaliningrad,Tripoli</option>				
				<option value="+3:00#Addis Ababa, Aden, Antananarivo#0">(GMT+03:00) Addis Ababa, Aden, Antananarivo,Asmera,Baghdad</option>
				<option value="+3:00#Asmera, Baghdad, Bahrain, Comoro, Dar es Salaam, Djibouti, Nairobi, Qatar, Riyadh, Syowa#0">(GMT+03:00)Bahrain, Comoro, Dar es Salaam, Djibouti, Nairobi, Qatar, Riyadh, Syowa</option>
				<option value="+3:00#Kampala, Khartoum, Kuwait, Mayotte, Mogadishu, Moscow+00#0">(GMT+03:00) Kampala, Khartoum, Kuwait, Mayotte, Mogadishu, Moscow+00</option>
				<option value="+3:30#Tehran#1">(GMT+03:30) Tehran</option>
				<option value="+4:00#Baku, Dubai, Mahe, Mauritius, Moscow+01 - Samara#0">(GMT+04:00) Baku, Dubai, Mahe, Mauritius, Moscow+01 - Samara</option>
				<option value="+4:00#Muscat, Reunion, Tbilisi, Yerevan#0">(GMT+04:00) Muscat, Reunion, Tbilisi, Yerevan</option>
				<option value="+4:30#Kabul#0">(GMT+04.30) Kabul</option>
				<option value="+5:00#Aqtau, Aqtobe, Ashgabat, Dushanbe#0">(GMT+05:00) Aqtau, Aqtobe, Ashgabat, Dushanbe,Mawson</option>
				<option value="+5:00#Karachi, Kerguelen, Maldives, Moscow+02 - Yekaterinburg, Tashkent#0">(GMT+05:00) Karachi, Kerguelen, Maldives, Moscow+02 - Yekaterinburg, Tashkent</option>
				<option value="+5:30#Colombo, India Standard Time#0">(GMT+05:30) Colombo, India Standard Time</option>
				<option value="+6:00#Almaty, Bishkek, Chagos, Dhaka#0">(GMT+06:00) Almaty, Bishkek, Chagos, Dhaka</option>
				<option value="+6:00#Moscow+03 - Omsk, Novosibirsk, Thimphu, Vostok#0">(GMT+06:00) Moscow+03 - Omsk, Novosibirsk, Thimphu, Vostok</option>
				<option value="+6:30#Cocos, Rangoon#0">(GMT+06:30) Cocos, Rangoon</option>
				<option value="+7:00#Bangkok, Christmas, Davis, Hanoi, Hovd, Jakarta#0">(GMT+07:00) Bangkok, Christmas, Hanoi, Hovd, Jakarta</option>
				<option value="+7:00#Moscow+04 - Krasnoyarsk, Phnom Penh, Vientiane#0">(GMT+07:00) Moscow+04 - Krasnoyarsk, Phnom Penh, Vientiane</option>
				<option value="+8:00#Brunei, Casey, China Time - Beijing,Singapore, Taipei#0">(GMT+08:00) Brunei, Casey, China Time - Beijing,Singapore, Taipei </option>
				<option value="+8:00#Hong Kong, Kuala Lumpur, Macau, Makassar, Manila, Moscow+05 - Irkutsk,Western Time - Perth#0">(GMT+08:00) Hong Kong, Kuala Lumpur, Macau, Makassar, Manila, Moscow+05 - Irkutsk,Western Time - Perth</option>
				<option value="+8:00#Ulaanbaatar, Choibalsan#0">(GMT+08:00)  Ulaanbaatar, Choibalsan</option>
				<option value="+9:00#Dili, Jayapura, Moscow+06 - Yakutsk, Palau, Pyongyang, Seoul, Tokyo#0">(GMT+09:00) Dili, Jayapura, Moscow+06 - Yakutsk, Palau, Pyongyang, Seoul, Tokyo</option>
				<option value="+9:30#Central Time - Darwin#0">(GMT+09:30) Central Time - Darwin</option>
				<option value="+10:00#Brisbane,Guam, Moscow+07 - Yuzhno-Sakhalinsk, Port Moresby, Saipan, Truk#0">(GMT+10:00)Brisbane,Guam, Moscow+07 - Yuzhno-Sakhalinsk, Port Moresby, Saipan, Truk</option>
				<option value="+10:30#Central Time - Adelaide#1">(GMT+10:30) Central Time - Adelaide</option>			
				<option value="+11:00#Efate, Guadalcanal, Kosrae, Moscow+08 - Magadan, Noumea, Ponape#0">(GMT+11:00) Efate, Guadalcanal, Kosrae, Moscow+08 - Magadan, Noumea, Ponape</option>
				<option value="+11:00#Hobart,Melbourne,Sydney#1">(GMT+11:00) Hobart,Melbourne,Sydney</option>
				<option value="+12:00#Fiji#1">(GMT+12:00)Fiji</option>
				<option value="+12:00#Funafuti, Kwajalein, Majuro, Moscow+09 - Petropavlovsk-Kamchatskiy, Nauru, Tarawa, Wake, Wallis#0">(GMT+12:00) Funafuti, Kwajalein, Majuro, Moscow+09 - Petropavlovsk-Kamchatskiy, Nauru, Tarawa, Wake, Wallis</option>
				<option value="+13:00#Enderbury, Tongatapu#0">(GMT+13:00) Fakaofo, Enderbury, Tongatapu</option>
				<option value="+13:00#Apia,Auckland, Antarctica/McMurdo, Antarctica/South_Pole#1">(GMT+13:00) Apia,Auckland, Antarctica/McMurdo, Antarctica/South_Pole</option>
						</select>
				  </div>
			   </div>			
      
    <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTHIDECLIENTPORTAL']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_disable_portal" id="vis_head_menu_disable_portal_y"  value="1"<? if($poral_setting['disable_portal']==1) echo ' checked="checked"'; ?>/ onclick="showpagesetting(this.value);"><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_disable_portal" id="vis_head_menu_disable_portal_n"  value="0"<? if($poral_setting['disable_portal']!=1) echo ' checked="checked"'; ?>/ onclick="showpagesetting(this.value);" ><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            
            <div id="pagesettings" style="display:<?=(isset($poral_setting['disable_portal']) && $poral_setting['disable_portal']==1)?'none':'block';?>;" >
      
			<div class="form-group">
               <label class="col-sm-12 setting-list">
                  <h4><? echo $vis_language['TXTDISPPAGES']; ?></h4>
               </label>
            </div>
            
             <div class="col-sm-6">  
             	
            
                 <? if(isset($module['solutions']) && $module['solutions']==1){ ?>
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSELFHELP']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                      <input type="radio"  name="vis_head_menu_selfhelp" id="vis_head_menu_selfhelp_y" onclick="change(this.value,'selfhelp:view_selfhelp_group','<? echo $vis_language['TXTSELFHELP']; ?>','<? echo $poral_setting['selfhelp'];?>');" value="1"<? if($poral_setting['selfhelp']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_selfhelp" id="vis_head_menu_selfhelp_n" onclick="change(this.value,'selfhelp:view_selfhelp_group','<? echo $vis_language['TXTSELFHELP']; ?>','<? echo $poral_setting['selfhelp'];?>');" value="0"<? if($poral_setting['selfhelp']!=1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
 				  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_selfhelp" id="vis_head_menu_selfhelp_l"  value="2" onclick="change(this.value,'selfhelp:view_selfhelp_group','<? echo $vis_language['TXTSELFHELP']; ?>','<? echo $poral_setting['selfhelp'];?>');" <? if($poral_setting['selfhelp']==2) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTVIEWAFTERLOGING']; ?></label>
                </div>
            </div>
            <? } ?>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSUBMITTICKET']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_submitticket" id="vis_head_menu_submitticket_y" onclick="change(this.value,'ticket:new_ticket_step_one','<? echo $vis_language['TXTSUBMITTICKET']; ?>','<? echo $poral_setting['submitticket'];?>');" value="1"<? if($poral_setting['submitticket']==1) echo 'checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio"  name="vis_head_menu_submitticket" id="vis_head_menu_submitticket_n" onclick="change(this.value,'ticket:new_ticket_step_one','<? echo $vis_language['TXTSUBMITTICKET']; ?>','<? echo $poral_setting['submitticket'];?>');" value="0"<? if($poral_setting['submitticket']!=1) echo 'checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
 				  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_submitticket" id="vis_head_menu_submitticket_l" value="2" onclick="change(this.value,'ticket:new_ticket_step_one','<? echo $vis_language['TXTSUBMITTICKET']; ?>','<? echo $poral_setting['submitticket'];?>');" <? if($poral_setting['submitticket']==2) echo 'checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTVIEWAFTERLOGING']; ?></label>
                </div>
            </div>
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTVIEWTICKETS']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_viewticket" id="vis_head_menu_viewticket_y"  onclick="change(this.value,'ticket:view_ticket','<? echo $vis_language['TXTVIEWTICKETS']; ?>','<? echo $poral_setting['viewticket'];?>');" value="1"<? if($poral_setting['viewticket']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_viewticket" id="vis_head_menu_viewticket_n" onclick="change(this.value,'ticket:view_ticket','<? echo $vis_language['TXTVIEWTICKETS']; ?>','<? echo $poral_setting['viewticket'];?>');" value="0"<? if($poral_setting['viewticket']!=1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTLOGIN']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_login" id="vis_editor_y" onclick="change(this.value,'home:login','<? echo $vis_language['TXTLOGIN']; ?>','<? echo $poral_setting['login'];?>');" value="1"<? if($poral_setting['login']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_login" id="vis_editor_n" onclick="change(this.value,'home:login','<? echo $vis_language['TXTLOGIN']; ?>','<? echo $poral_setting['login'];?>');" value="0"<? if($poral_setting['login'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTREGISTER']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_register" id="vis_head_menu_register_y" value="1"<? if($poral_setting['register']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_register" id="vis_head_menu_register_n" value="0"<? if($poral_setting['register']!=1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
             <? if(isset($module['billing']) && $module['billing']==1){ ?>
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTBILLING']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_billing" id="vis_head_menu_billing_y" value="1"<? if($poral_setting['billing']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_billing" id="vis_head_menu_billing_n" value="0"<? if($poral_setting['billing']!=1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <? } ?>
            <? if(VIS_ITIL==1 && (isset($module['itil']) && $module['itil']==1)){?>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTITILSERVICECATALOG']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_service" id="vis_head_menu_service_y" onclick="change(this.value,'setting:view_services','<? echo $vis_language['TXTITILSERVICECATALOG']; ?>','<? echo $poral_setting['service'];?>');" value="1"<? if($poral_setting['service']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_service" id="vis_head_menu_service_n" onclick="change(this.value,'setting:view_services','<? echo $vis_language['TXTITILSERVICECATALOG']; ?>','<? echo $poral_setting['service'];?>');" value="0"<? if($poral_setting['service'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <? }?>
			  <? if(isset($module['forums']) && $module['forums']==1){ ?>
			<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTFORUMS']; ?></label>
               <div class="col-sm-10">
                  <label class="radio i-checks m-r-lg pull-left">
                      <input type="radio"  name="vis_head_menu_forum" id="vis_head_menu_forum_y" onclick="change(this.value,'forums:view_forums_group','<? echo $vis_language['TXTFORUMS']; ?>','<? echo $poral_setting['forum'];?>');" value="1"<? if($poral_setting['forum']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_forum" id="vis_head_menu_forum_n" onclick="change(this.value,'forums:view_forums_group','<? echo $vis_language['TXTFORUMS']; ?>','<? echo $poral_setting['forum'];?>');" value="0"<? if($poral_setting['forum']!=1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
 				  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_forum" id="vis_head_menu_forum_l"  value="2" onclick="change(this.value,'forums:view_forums_group','<? echo $vis_language['TXTFORUMS']; ?>','<? echo $poral_setting['forum'];?>');" <? if($poral_setting['forum']==2) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTVIEWAFTERLOGING']; ?></label>
                </div>
            </div>
            <? } ?>  
<!---///////////////////////////////////-->

<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTASSETS']; ?></label>
               <div class="col-sm-8">
					 <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_assets" id="vis_assets_y" value="1"<? if($poral_setting['assets']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_assets" id="vis_assets_n" value="0"<? if($poral_setting['assets'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                  
                </div>
            </div>





<!---///////////////////////////////////-->
			
             </div>
             <div class="col-sm-6">      
            <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTTICKETRATING']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_rating" id="vis_head_menu_rating_y" value="1"<? if($poral_setting['rating']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_rating" id="vis_head_menu_rating_n" value="0"<? if($poral_setting['rating'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTASSIGNEDTO']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_assignedto" id="vis_head_menu_assignedto_y" value="1"<? if($poral_setting['assignedto']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_assignedto" id="vis_head_menu_assignedto_n" value="0"<? if($poral_setting['assignedto'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
             <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTSLA']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_sla" id="vis_head_menu_sla_y" value="1"<? if($poral_setting['sla']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_sla" id="vis_head_menu_sla_n" value="0"<? if($poral_setting['sla'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
             <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTHTMLEDITOR']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_html_editor" id="vis_editor_y" value="1"<? if($poral_setting['html_editor']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_html_editor" id="vis_editor_n" value="0"<? if($poral_setting['html_editor'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
      
             <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTSTAFFNAMEPROFILEIMAGE']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_staffNm" id="vis_head_menu_staffNm_y" value="1"<? if($poral_setting['staffnm']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_staffNm" id="vis_head_menu_staffNm_n" value="0"<? if($poral_setting['staffnm'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTCANCLIENTCLOSETICKET']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_close_ticket" id="vis_head_menu_close_ticketNm_y" value="1"<? if($poral_setting['close_ticket']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_close_ticket" id="vis_head_menu_close_ticketNm_n" value="0"<? if($poral_setting['close_ticket'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div> 
            
            <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTFEEDBACKCLIENT']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_feedback_client" id="vis_head_menu_feedback_clientNm_y" value="1"<? if($poral_setting['feedback_client']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks pull-left">
                  <input type="radio" name="vis_head_menu_feedback_client" id="vis_head_menu_feedback_clientNm_n" value="0"<? if($poral_setting['feedback_client'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                </div>
            </div>
            
			 <div class="form-group">
               <label class="col-sm-4 control-label"><? echo $vis_language['TXTSOLUTIONANDTICKETSEARCH']; ?></label>
               <div class="col-sm-8">
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_solution_ticket_search" id="vis_head_menu_solution_ticket_search_y" value="1"<? if($poral_setting['solution_ticket_search']==1) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTYES']; ?></label>
                  <label class="radio i-checks m-r-lg pull-left">
                  <input type="radio" name="vis_head_menu_solution_ticket_search" id="vis_head_menu_solution_ticket_search_n" value="0"<? if($poral_setting['solution_ticket_search'] == 0) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTNO']; ?></label>
                  <label class="radio i-checks pull-left">
                   <input type="radio" name="vis_head_menu_solution_ticket_search" id="vis_head_menu_solution_ticket_search_l" value="2"<? if($poral_setting['solution_ticket_search'] == 2) echo ' checked="checked"'; ?>/><i></i>
                  <? echo $vis_language['TXTVIEWAFTERLOGING']; ?></label>
                </div>
            </div>
			<div class="form-group">	
			 <label class="col-sm-2 control-label"></label>
               <div class="col-sm-10">                  
                </div></div>
           </div> 
             <? $after_login_count = $count = 0;
				  if(isset($module['solutions']) && $module['solutions']==1) {
						if($poral_setting['selfhelp'] == 1 ) { $count++; $after_login_count++; }
				  }
                if($poral_setting['login'] == 1 ) $count++; 
                if($poral_setting['submitticket'] == 1) { $count++; $after_login_count++; }				
				if(isset($module['forums']) && $module['forums']==1) {
					if($poral_setting['forum'] == 1) { $count++; $after_login_count++; }		
				}
				if($poral_setting['viewticket'] == 1) { $after_login_count++; }		
				if(VIS_ITIL==1 && (isset($module['itil']) && $module['itil']==1)){
					 if($poral_setting['service'] == 1) { $after_login_count++; }	
				}		
				 
               ?>
             <input type="hidden" name="count" id="count" value="<? echo $count;?>"/>           
             <div id="default_homepage" <?php if(($poral_setting['selfhelp']==0 || (!isset($module['solutions']) && $module['solutions']!=1)) && $poral_setting['login']==0 && $poral_setting['submitticket']==0 && ($poral_setting['forum']==0 || (!isset($module['forums']) && $module['forums']!=1)) ){?>style="display:none"<?php } ?> class="col-0">			
             <div class="form-group">
                 <label class="col-sm-2 control-label"><? echo $vis_language['TXTDEFAULTPAGEBEFORELOGIN']; ?></label>
                 <div class="col-sm-10"> 
                <select name="vis_default_home_operation" id="vis_default_home_operation" class="form-control input-sm">  
                
             <option value="selfhelp:home"<? if($default_home=='selfhelp:home') echo ' selected="selected"'; ?>><? echo $vis_language['TXTHOME']; ?></option>
                              
                    <? if($poral_setting['selfhelp']!=0) { ?><? if(isset($module['solutions']) && $module['solutions']==1){ ?><option value="selfhelp:view_selfhelp_group"<? if($default_home=='selfhelp:view_selfhelp_group') echo ' selected="selected"'; ?>><? echo $vis_language['TXTSELFHELP']; ?></option><? } } ?>			
                    	
					<? if($poral_setting['forum']!=0) { ?><? if(isset($module['forums']) && $module['forums']==1){ ?><option value="forums:view_forums_group"<? if($default_home=='forums:view_forums_group') echo ' selected="selected"'; ?>><? echo $vis_language['TXTFORUMS']; ?></option><? } } ?>
                    <? if($poral_setting['login']!=0) { ?><option value="home:login"<? if($default_home=='home:login') echo ' selected="selected"'; ?>><? echo $vis_language['TXTLOGIN']; ?></option><? }?>
                    <? if($poral_setting['submitticket']!=0) { ?><option value="ticket:new_ticket_step_one"<? if($default_home=='ticket:new_ticket_step_one') echo ' selected="selected"'; ?>><? echo $vis_language['TXTSUBMITTICKET']; ?></option><? }?>
                </select>  
                 </div>
			  </div> 
			 </div>
			 <input type="hidden" name="after_login_count" id="after_login_count" value="<? echo $after_login_count;?>"/>           
             <div id="default_homepage_after_login" <?php if(($poral_setting['selfhelp']==0 || (!isset($module['solutions']) && $module['solutions']!=1)) && $poral_setting['submitticket']==0 && ($poral_setting['forum']==0 || (!isset($module['forums']) && $module['forums']!=1)) && $poral_setting['viewticket']==0 && ($poral_setting['service']==0 || (VIS_ITIL!=1 && (!isset($module['itil']) && $module['itil']!=1)))){?>style="display:none"<?php } ?>>			
			   <div class="form-group">
                 <label class="col-sm-2 control-label"><? echo $vis_language['TXTDEFAULTPAGEAFTERLOGIN']; ?></label>
                 <div class="col-sm-10"> 
                <select name="vis_default_page_after_login" id="vis_default_page_after_login" class="form-control input-sm">  
                  <option value="selfhelp:home"<? if($default_home_after_login=='selfhelp:home') echo ' selected="selected"'; ?>><? echo $vis_language['TXTHOME']; ?></option>
                              
                    <? if($poral_setting['selfhelp']!=0) { ?><? if(isset($module['solutions']) && $module['solutions']==1){ ?><option value="selfhelp:view_selfhelp_group"<? if($default_home_after_login=='selfhelp:view_selfhelp_group') echo ' selected="selected"'; ?>><? echo $vis_language['TXTSELFHELP']; ?></option><? } } ?>	
                    			
					<? if($poral_setting['forum']!=0) { ?><? if(isset($module['forums']) && $module['forums']==1){ ?><option value="forums:view_forums_group"<? if($default_home_after_login=='forums:view_forums_group') echo ' selected="selected"'; ?>><? echo $vis_language['TXTFORUMS']; ?></option><? } } ?>  
                    <? if($poral_setting['submitticket']!=0) { ?><option value="ticket:new_ticket_step_one"<? if($default_home_after_login=='ticket:new_ticket_step_one') echo ' selected="selected"'; ?>><? echo $vis_language['TXTSUBMITTICKET']; ?></option><? }?>
                    <? if($poral_setting['viewticket']!=0) { ?><option value="ticket:view_ticket"<? if($default_home_after_login=='ticket:view_ticket') echo ' selected="selected"'; ?>><? echo $vis_language['TXTVIEWTICKETS']; ?></option><? }?>
                    <? if($poral_setting['service']!=0) { ?><? if(VIS_ITIL==1 && (isset($module['itil']) && $module['itil']==1)){ ?><option value="setting:view_services"<? if($default_home_after_login=='setting:view_services') echo ' selected="selected"'; ?>><? echo $vis_language['TXTITILSERVICECATALOG']; ?></option><? } } ?>  
                </select>  
                 </div>
			  </div> 
             </div>
             
             </div>
             
            <div class="line b-b line-lg pull-in"></div>
            <br/>
            
            
            <div class="form-group">
               <div class="col-sm-4 col-sm-offset-2">
                  <button type="button" class="btn btn-primary" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'update_portal', 'vis_form':'vis_portal_setting'})"><? echo $vis_language['TXTUPDATE']; ?></button>
               </div>
            </div>
      </div>
      </form>
      </div>
   </section>
</section>
<script src="<?= VIS_PATH_SCRIPT; ?>file-input/bootstrap-filestyle.min.js"></script>
<script src="<?= VIS_PATH_SCRIPT; ?>colorpicker/js/bootstrap-colorpicker.js"></script>
<script>
	var tes = '<? echo calulate_timezone($domain_details['timezone'])."#".$domain_details['timezone_name']; ?>';
    $("#vis_timezone").val(tes);
    $(".selectpicker").selectpicker();
	function toggle_logo(e) {
		if(e.value=='image') {
			$("#vis_logo_image").css("display","");
			$("#vis_logo_text").css("display","none");
			$("#text_logo").css("display","none");
			$("#image_logo").css("display","");
		}
		else {
			$("#vis_logo_text").css("display","");
			$("#vis_logo_image").css("display","none");
			$("#text_logo").css("display","");
			$("#image_logo").css("display","none");
		}
	 }
	 function clear_logo()
	 {
		$('#clear_client_logo_Img').visExecution('load_area', {'vis_module':'setting', 'vis_operation':'remove_logo'});
	 }
	 function clear_favicon()
	 {
		$('#clear_client_favicon_Img').visExecution('load_area', {'vis_module':'setting', 'vis_operation':'remove_logo','vis_favicon_clear':1});
	 }
        function change(page, value, options,portal_setting) { 
			if(options=='Login'){
            $("#default_homepage").show(); 
            var dropdown_count =  $("#count").val();
			}
			else if(options=='Service catalog' || options=='View tickets'){
			$("#default_homepage_after_login").show();             
            var dropdown_count_after_login =  $("#after_login_count").val(); 
			}
			else {  
			$("#default_homepage").show(); 
            var dropdown_count =  $("#count").val();
            $("#default_homepage_after_login").show();             
            var dropdown_count_after_login =  $("#after_login_count").val(); 
			}
           if(page == 1 ) { 
			   if(options=='Login'){
			   dropdown_count++;
			   $("#count").val(dropdown_count);
			   changeSelect('vis_default_home_operation', value, options);
			   }else if(options=='Service catalog' || options=='View tickets')
			   {
				  dropdown_count_after_login++; 
				  $("#after_login_count").val(dropdown_count_after_login);
				  changeSelect('vis_default_page_after_login', value, options);
			   }
			   else {
			   dropdown_count_after_login++; 
               dropdown_count++;
			   $("#count").val(dropdown_count);
			   $("#after_login_count").val(dropdown_count_after_login);
               changeSelect('vis_default_home_operation', value, options);
			   changeSelect('vis_default_page_after_login', value, options);
			}
        }
           else if(page == 0 ) {
			    if(options=='Login'){
				   $("select#vis_default_home_operation option[value='"+value+"']").remove();  
				   dropdown_count--;
				   $("#count").val(dropdown_count);
				}else if(options=='Service catalog' || options=='View tickets')
				{
				   $("select#vis_default_page_after_login option[value='"+value+"']").remove();
				   dropdown_count_after_login--;
				   $("#after_login_count").val(dropdown_count_after_login);
				}else{	
				   $("select#vis_default_home_operation option[value='"+value+"']").remove();  
				   $("select#vis_default_page_after_login option[value='"+value+"']").remove();  
                   dropdown_count--;
                   dropdown_count_after_login--;
                   $("#count").val(dropdown_count);
                   $("#after_login_count").val(dropdown_count_after_login);
			   }
			   if(dropdown_count < 1) $("#default_homepage").hide();
			   if(dropdown_count_after_login < 1) $("#default_homepage_after_login").hide();
           }
       }
        function changeSelect(fieldID, newValues, newOptions)
        {
          selectField = document.getElementById(fieldID);                  
          if (newValues && newOptions)
          {
             selectField.options[selectField.length] = new Option(newOptions, newValues);
          }
        }
</script>
<script>
$(function() {
   	function createColorpickers() {
   		$('.demo-auto').colorpicker();
   	}
   	createColorpickers();
	
	$("[id^='vis_satellite_helpdesk']").bind('click', function() {
		//console.log(this.id);
		if(this.id == 'vis_satellite_helpdesk3') {
			$("#domain_list").hide();
		} else {
			$("#domain_list").show();
		}		
	});	
 });
 	$("[data-toggle=popover1]").popover({
		placement: "bottom",
		content: "This option offers - <br>1) Single staff portal to manage multiple companies / brands / products support at one place.<br>2) Each Company can have its own customer portal.<br>3) Cutomer registered on company A customer portal can not use same login on Company B customer portal.<br>4) Tickets from company A cannot be moved to Company B.",
		trigger: "hover",
		html: 'true'
	});
	$("[data-toggle=popover2]").popover({
		placement: "bottom",
		content: "This option offers - <br>1) Single staff portal to manage multiple companies / brands / products support at one place.<br>2) Each Company can have its own customer portal.<br>3) Cutomer registered on company A customer portal can use same login on Company B customer portal and vice versa.<br>4) Tickets from company A can be moved to Company B and vice versa.",
		trigger: "hover",
		html: 'true'
	});
	$("[data-toggle=popover3]").popover({
		placement: "bottom",
		content: "This option offers - <br>1) Single staff portal to manage multiple companies / brands / products support at one place.<br>2) Single Customer portal<br>3) Tickets from company A can be moved to Company B and vice versa.",
		trigger: "hover",
		html: 'true'
	});
	
	function showpagesetting(id)
	{
		if(id==1){
			$('#pagesettings').hide();
		}else{
			$('#pagesettings').show();
		}
		
	}
function showcustomdatetime(setv){
		if(setv=='custom'){
			$('#customdtm').removeClass('hide');
			$('#customdtm').addClass('show');
		}else{
			$('#customdtm').removeClass('show');
			$('#customdtm').addClass('hide');
		}
		
	}
	
</script>
</div>
