                 <?php  
            
					$_opt = getCO(NULL, array(PFIX."_ga_id", PFIX."_ga_pass", PFIX."_ga_profile"));
					
					  if ((!empty($_opt[PFIX."_ga_id"]) && !empty($_opt[PFIX."_ga_pass"])) || (defined("GA_ID")&&defined("GA_PASS"))):
					  
					 
					echo
					'<script type="text/javascript">
							jQuery(document).ready(function() {
										
								
										jQuery.ajax({
										  url: "'.TMP_ADMIN.'/ajax/ga_check.php",
										  cache: false,
										  data: ({x : "main"}),
										  success: function(data) {
											  
											 if (jQuery.trim(data)=="NOAUTH") {
												 jQuery("#ga_error").html("<div style=\'color:#C00;font: bold 13px/17px Arial, Helvetica, sans-serif;text-align:center; margin:0 20px 20px;\'>'.__('Connection is failed. Please check your account informations','cloudfw').'</div>");
												 jQuery("#ga_form").show();
												 jQuery("#ga_check").hide();
												 return false;
												 }
											  
											jQuery("#ga_check").html(data);
											
										function setupLabel() {
											if (jQuery(".label_check input").length) {
												jQuery(".label_check").each(function(){ 
													jQuery(this).removeClass("c_on");
												});
												jQuery(".label_check input:checked").each(function(){ 
													jQuery(this).parent("label").addClass("c_on");
												});                
											};
											if (jQuery(".label_radio input").length) {
												jQuery(".label_radio").each(function(){ 
													jQuery(this).removeClass("r_on");
												});
												jQuery(".label_radio input:checked").each(function(){ 
													jQuery(this).parent("label").addClass("r_on");
												});
											};
										};
											jQuery(".label_check, .label_radio").live("click",function(){
												setupLabel();
												
												jQuery("input[name^=\'ga_profile\']").live("click",function(){
																									 
													jQuery("#'.PFIX.'_ga_profile").val(jQuery(this).val());
													
													
													});
												
											});
											setupLabel();

										  }
										  
										});
										
										
															
															
							
							});
							
							</script>
			
						';?>    
                        
                        <div id="ga_check">
                        
                        	<div class="loading"></div>
                        
                        </div> 
                         
                        <input type="hidden" name="<?php echo PFIX;?>_ga_profile" id="<?php echo PFIX;?>_ga_profile" value="<?php echo $_opt[PFIX."_ga_profile"]; ?>"  /> 
                       
                      
					  
                        
                      <?php
					  
					  $hide_ga_form = TRUE;
					  endif;
					  ?>
                      

                      
                      <div id="ga_form"<?php if ($hide_ga_form) echo ' style="display:none;"'; ?>>
                      
                      <div class="grid fullwidth">
                        
                        <div class="info-div box-div" style="margin:-10px 20px 10px; width:auto;">
                        <?php _e('Please enter your account information. You have to have a Google Account to show Google Analytics on CloudFW Dashboard . If you don\'t have, please <a href="http://www.google.com/analytics" target="_blank">create an account</a>.','cloudfw'); ?>
                        </div>
                        
                        </div>
             		  <div class="clear"></div>
                      
                                            
                      	<div id="ga_error"></div>
             		
                     <!-- ROW -->
                        <div class="grid oneof4"><span class="title"><?php _e('Google Account ID:','cloudfw'); ?></span> </div>
                        <div class="grid threeof4 last"> 	
							
                        <input type="text" name="<?php echo PFIX.'_ga_id'; ?>" id="<?php echo PFIX.'_ga_id'; ?>" value="" class="input input_400" autocomplete="off" /> 
                          
                        </div>
             		   	<div class="clear"></div>
                        <!-- /ROW -->
         
                     <!-- ROW -->
                        <div class="grid oneof4"><span class="title"><?php _e('Password:','cloudfw'); ?></span> </div>
                        <div class="grid threeof4 last"> 	
							
                        <input type="password" name="<?php echo PFIX.'_ga_pass'; ?>" id="<?php echo PFIX.'_ga_pass'; ?>" value="" class="input input_200" autocomplete="off" /> 
                          
                        </div>
             		   	<div class="clear"></div>
                        <!-- /ROW -->
                        
                       </div>