
var div_id
var personalized_message
var emai_prov="";
var character_limit = "500";
/*
YAHOO.namespace("example.share_container");
*/

var AjaxObject = {

 handleSuccess_checkloggedin:function(o){
    if(o.responseText != 'visitor')
      {
	document.getElementById('login_div').innerHTML ="";
        YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_showprimaryfriends/', callback_showprimaryfriends);    
        YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_showsecondaryfriends/', callback_showpsecondaryfriends);

      }
    else
      {
	    document.getElementById('submit_button').innerHTML = "<div class=\"btnshare\"><button type=\"button\" id=\"sharebtn\" value=\"Invite/Share\" name=\"Invite/Share\" class=\"lrgblackreverse\" style=\"padding-right:7px;\" onclick=\"return  validateTextBox_non();\"><b>Share</b></button><br clear=\"all\"><br class=\"spacer0\"></div>";
      }

  document.getElementById('share_popup').style.display='';
  YAHOO.example.share_container.share_popup.show();
 
  },
 handleFailure_checkloggedin:function(o){
  },

 handleSuccess_verifylogin:function(o){
    if(isNaN(o.responseText))
      {   
        document.getElementById('login_error').innerHTML = "<font color='red'>"+o.responseText+"<font>";   
      }
    else if(!isNaN(o.responseText))
      {
         var post_data = '&user='+o.responseText;
	 document.getElementById('login_div').innerHTML ="";
	 YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_showprimaryfriends/', callback_showprimaryfriends, post_data);    
         YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_showsecondaryfriends/', callback_showpsecondaryfriends, post_data );
         document.getElementById('submit_button').innerHTML = "<div class=\"btnshare\"><button type=\"button\" value=\"Invite/Share\" name=\"Invite/Share\" class=\"lrgblackreverse\" style=\"padding-right:7px;\" onclick=\"return  validateTextBox();\"><b>Share</b></button><br clear=\"all\"><br class=\"spacer0\"></div>";


      }
  },
 handleFailure_verifylogin:function(o){
  },

 handleSuccess_getmyaddressbook:function(o){
    document.getElementById('frm2').innerHTML = o.responseText;   
  },
 handleFailure_getmyaddressbook:function(o){
  },

 handleSuccess_sendsharemail:function(o)
 {  
    //Success handle
    var link             = document.getElementById('link').value;
    var linkValue = link.split('/');
    if(linkValue[1] == 'video' || linkValue[2] == '_view_video')
    {
    document.getElementById('mymedia').style.display='block';
    }
    document.getElementById("share_mail_success").innerHTML = o.responseText;
  },
 handleFailure_sendsharemail:function(o){
    // Failure handler
  },


 handleSuccess_showprimaryfriends:function(o){  
    //Success handle
  document.getElementById("primary_friends_div").innerHTML = o.responseText;
  },
 handleFailure_showsecondaryfriends:function(o){
    // Failure handler
  },


 handleSuccess_showpsecondaryfriends:function(o){  
    //Success handle
  document.getElementById("secondary_friends_div").innerHTML = o.responseText;

  },
 handleFailure_showpsecondaryfriends:function(o){
    // Failure handler
  },

 handleSuccess_mynetworkschools:function(o){  
    //Success handle
  document.getElementById("myNetworks_div").innerHTML = o.responseText;

  },
 handleFailure_mynetworkschools:function(o){
    // Failure handler
  },

 handleSuccess_mynetworkworkplace:function(o){  
    //Success handle
  document.getElementById("myNetworks_div").innerHTML = o.responseText;

  },
 handleFailure_mynetworkworkplace:function(o){
    // Failure handler
  }

       
};


/*
 * Define the callback object for success and failure
 * handlers as well as object scope.
 */

var callback_checkloggedin =
{
    success:AjaxObject.handleSuccess_checkloggedin,
    failure:AjaxObject.handleFailure_checkloggedin,
    scope: AjaxObject
};


var callback_verifylogin =
{  	
    success:AjaxObject.handleSuccess_verifylogin,
    failure:AjaxObject.handleFailure_verifylogin,
    scope: AjaxObject
};



var callback_getmyaddressbook =
{  	
    success:AjaxObject.handleSuccess_getmyaddressbook,
    failure:AjaxObject.handleFailure_getmyaddressbook,
    scope: AjaxObject
};

var callback_sendsharemail =
{
    success:AjaxObject.handleSuccess_sendsharemail,
    failure:AjaxObject.handleFailure_sendsharemail,
    scope: AjaxObject
};


var callback_showprimaryfriends =
{
    success:AjaxObject.handleSuccess_showprimaryfriends,
    failure:AjaxObject.handleFailure_showprimaryfriends,
    scope: AjaxObject
};


var callback_showpsecondaryfriends =
{
    success:AjaxObject.handleSuccess_showpsecondaryfriends,
    failure:AjaxObject.handleFailure_showpsecondaryfriends,
    scope: AjaxObject
};

var callback_mynetworkschools =
{
    success:AjaxObject.handleSuccess_mynetworkschools,
    failure:AjaxObject.handleFailure_mynetworkschools,
    scope: AjaxObject
};


var callback_mynetworkworkplace =
{
    success:AjaxObject.handleSuccess_mynetworkworkplace,
    failure:AjaxObject.handleFailure_mynetworkworkplace,
    scope: AjaxObject
};



//! Method to initialize popup
function init_share()
{
  // Instantiate the Dialog
  YAHOO.example.share_container.share_popup = new YAHOO.widget.Dialog("share_popup", 
	{ width : "50em",
		context:["popup_share","tl","bl"],
		visible : false, 
		modal:true
	});
  YAHOO.example.share_container.share_popup.render();

}

//YAHOO.util.Event.onDOMReady(init_share);



//!Method to show popup
function share()
{  
  var post_data = "";
  
  YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_checkloggedin/', callback_checkloggedin, post_data);

}

//!Method to show share video jquery 
function shareVideo()
{  
  var post_data = "";
  
  jQuery.post(system_base_url+'ajax/share/_checkloggedin/', post_data, callback_checkloggedinjQuery);

}

function sharePhoto()
{  
  var post_data = "";
  
  jQuery.post(system_base_url+'ajax/share/_checkloggedin/', post_data, callback_checkloggedinjQueryphoto);

}

function callback_checkloggedinjQuery(data)
{
  if(data == 'visitor')
   {
    document.getElementById('submit_button1').innerHTML = "<div class=\"btnshare\"><button type=\"button\" id=\"sharebtn\" value=\"Invite/Share\" name=\"Invite/Share\" class=\"lrgblackreverse\" style=\"padding-right:7px;\" onclick=\"return  validateTextBox_nonJquery();\"><b>Share</b></button><br clear=\"all\"><br class=\"spacer0\"></div>";
  }
}


function callback_checkloggedinjQueryphoto(data)
{
    
  if(data == 'visitor')
   {
    document.getElementById('submit_button1').innerHTML = "<div><button class=\"submitBtn\" onclick=\"validateTextBox_nonJqueryphoto();return false;\"><span>Share</span></button>&nbsp;<button class=\"submitBtn\" onclick=\"closephotoSharePopUpJquery();return false;\"><span>Close</span></button></div>";
   }
}


//! Method to hide share popup
function hideShare()
{  
  YAHOO.example.share_container.share_popup.hide();
  document.getElementById('share_popup').style.display='none';
}



//! Method to toggle checked boxes
function toggleAll_share(cb,frm_id) 
{		
  var val = cb.checked;
  var frm = document.getElementById(frm_id);		
  var len = frm.elements.length;
  var i=0;
  for( i=0 ; i<len ; i++) 
    {
      if(frm.elements[i].name=='invite_check') 
	{
	  frm.elements[i].checked=val;
	}
    }
}

	
//! Method to collect checked items into text box
function getemailids()
{
  var formArray = new Array();
  var email_str = "";
  var username_str = "";
  var ge_email_text_box=document.getElementById('email_text_box');

  formArray[0] = "frm_check";
  formArray[1] = "frm_check_sec";
  formArray[2] = "frm_myAddressBook";
  formArray[3] = "frm_myNetworks";
		
  var form_nos = formArray.length; 
  var i=0;
  for( i=0 ; i<form_nos ; i++) 
    {
      var fr = formArray[i];
      var frm = document.getElementById(fr);			
      if(frm)
	{
				
	  var len = frm.elements.length;			
	  var j=0;
	  for( j=0; j<len; j++) 
	    {
	      if(frm.elements[j].name=='invite_check' && frm.elements[j].checked) 
		{
		  var elementValue = frm.elements[j].value.split(',');
		  if((ge_email_text_box.value==' ')||(ge_email_text_box.value==null)||(ge_email_text_box.value.length==0))
		    {
		      if(username_str=="")
			{
			  username_str=elementValue[0];
			}
		      else
			{
			  username_str+=", "+elementValue[0];
			}
		    }
		  else
		    {
		      username_str+=", "+elementValue[0];
		      //email_str+=elementValue[1]+", ";
		    }
		  frm.elements[j].checked=this.checked;
		}
	      if(frm.elements[j].name=='checkall' && frm.elements[j].checked)
		{
		  frm.elements[j].checked=this.checked;
		}
	    }
				
	}
			
    }
		
  ge_email_text_box.value+=username_str;		
		
}



//! Method to login from popup
function letmein()
{
  var user=document.getElementById('username');
  var pass=document.getElementById('password');
  var ge=document.getElementById('login_error');
  var post_data = '&login='+user.value+'&pass='+pass.value;
			
  ge.innerHTML =  "Please wait... <img src='"+system_base_url+"storage/image/default/share/busy.gif' alt='loading' />";

  YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_verifylogin/', callback_verifylogin, post_data);    
}



//! Method to show secondary friends		
function secondaryFriends(profile_id)
{
  var post_data = '&profile_id='+profile_id;

  /*  var ge = document.getElementById('secondary_friends_div');
		
if(ge.innerHTML)
  {
    ge.innerHTML="";
  }
  ge.innerHTML = "Please wait... <img src='"+system_base_url+"storage/image/default/share/busy.gif' alt='loading' />";*/

 YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_showsecondaryfriends/', callback_showpsecondaryfriends, post_data);    


}


//! Method to get provider
function getprovider(eml_pro)
{		
  emai_prov=eml_pro;		   
}



//! Method to show my address book	
function showMyAddressBook()
{
  var provider  = emai_prov;
  var username  = document.getElementById('emailid').value;
  var password  = document.getElementById('passwd').value;

  var ge1 = document.getElementById('frm1');
  var ge2 = document.getElementById('frm2');
		
  ge1.style.display = "none";		
  ge2.style.display = "block";
  if(ge2.innerHTML)
    {
      ge2.innerHTML="";
    }
  ge2.innerHTML="Please wait... <img src='"+system_base_url+"storage/image/default/share/busy.gif' alt='loading' />";

  var post_data = '&username='+username+'&password='+password+'&provider='+provider;
  YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_getmyaddressbook/', callback_getmyaddressbook, post_data);  
		
} 


//! Method to show imput boxes for gobbler
function showInputBoxes()
{
  ge1 = document.getElementById('frm1');
  ge1.style.display = "block";
  document.getElementById('emailid').value='Username';
  document.getElementById('passwd').value='******';
  ge2 = document.getElementById('frm2');
  if(ge2.innerHTML)
    {
      ge2.innerHTML="";
    }
  ge2.style.display = "none";
}


//! Method to check empty fields
function isEmpty(action, error_div)
{
  var getEByAction=document.getElementById(action);
  if(getEByAction.value=="")
    {
      displayError(error_div,"<font color='red'>Please enter "+action+"...</font>");	
      getEByAction.focus();

      return false;
    }
  else
    {
      return true;
    }
}


	
//! Method to show my network
function showMyNetwork(action)
{
  //var geS = document.getElementById(action+'_div');
  var geS = document.getElementById('schools_div');
  var geW = document.getElementById('workplace_div');
  var geN = document.getElementById('myNetworks_div');
  var geA =document.getElementById(action);
  //var workplace=document.getElementById('workplace').value;
		
  geS.style.display = "none";
  geW.style.display = "none";
  geN.style.display = "block";
  if(geN.innerHTML)
    {
      geN.innerHTML="";
    }
  geN.innerHTML =  "Please wait... <img src='"+system_base_url+"storage/image/default/share/busy.gif' alt='loading' />";

  if(action == 'schools')
    {
      var post_data = '&school='+geA.value;
      YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_mynetworkschools/', callback_mynetworkschools, post_data);  

    }
  else if(action == 'workplace')
    {
      var post_data = '&workplace='+geA.value;
      YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_mynetworkworkplace/', callback_mynetworkworkplace, post_data);  

    }


}



//! Method to show my network again
function showMyNetworksAgain()
{
  var geS = document.getElementById('schools_div');
  var geW = document.getElementById('workplace_div');
  var geN = document.getElementById('myNetworks_div');
  var education=document.getElementById('schools');
  var workplace=document.getElementById('workplace');

  if(geN.innerHTML)
    {
      geN.innerHTML="";
    }
  geN.style.display = "none";
  geW.style.display = "block";
  geS.style.display = "block";
  education.value='';
  workplace.value='';			
}


//! Method to check email text box is empty	
function isEmailTextBoxEmpty()
{
  var email_text=document.getElementById('email_text_box');
  if((email_text.value==' ')||(email_text.value==null)||(email_text.value.length==0))
    {
      displayError('error','Please provide friend(s) email id');
      document.getElementById('email_text_box').focus();
      return false;
    }
  else
    {
      clearError('error');
      return true;
    }

}	


//! Method to ckeck limit in personal message	
function limiter()
{		  
			
  var tex = document.getElementById('personal_message').value;
  var len = tex.length;
  if(len > character_limit)
    {
      tex = tex.substring(0,character_limit);
      document.getElementById('personal_message').value =tex;
      return false;
    }
  document.getElementById('chrcount').innerHTML = character_limit-len+' Characters remain.(Max 500 Character)';
			
}


//! Method to validate '@' sign 
function validate_at_sign(box_id,error_div)
{
  var return_type=true;
  var str = "@";
  var email_box=document.getElementById(box_id);
  for(var i=0; i<email_box.value.length; i++)
    {
      if(str.indexOf(email_box.value.charAt(i)) != -1)
	{
	  displayError(error_div,"<font color='red'>Enter your username only.<font>");
	  email_box.focus();			
	  return_type=false;
	}
    }

  return return_type;
}	 


//! Method to validate email text box
function validate_TextBox(text_box_id,error_div)
{
  var return_type=true;
  var str = "!#$%^&*()+=[]\\\';/{}|\":<>?";
  var email_text_box=document.getElementById(text_box_id);
  for(var i=0; i<email_text_box.value.length; i++)
    {
      if(str.indexOf(email_text_box.value.charAt(i)) != -1)
	{
	  displayError(error_div,"<font color='red'>Special characters are not allowed.<font>");
	  email_text_box.focus();			
	  return_type=false;
	}
    }

  return return_type;
}	


//! Method to validate personal message
function validate_PersonalMessageBox(text_box_id,error_div)
{
  var return_type=true;
  var str = "#$%^&*()+=[]\\\;/{}|\":<>?";
  var email_text_box=document.getElementById(text_box_id);
  for(var i=0; i<email_text_box.value.length; i++)
    {
      if(str.indexOf(email_text_box.value.charAt(i)) != -1)
	{
	  displayError(error_div,"<font color='red'>Special characters are not allowed.<font>");
	  email_text_box.focus();			
	  return_type=false;
	}
    }

  return return_type;
}	


//! Method to validate name
function validateName(nameFild,error_div)
{
  var return_type=true;
  var str = "!@#$%^&*()+=[]\\\';,/{}|\":<>?";
  var name=document.getElementById(nameFild);
  for(var i=0; i<name.value.length; i++)
    {
      if(str.indexOf(name.value.charAt(i)) != -1)
	{
	  displayError(error_div,"<font color='red'>Special characters are not allowed.<font>");
	  name.focus();			
	  return_type=false;
	}
    }

  return return_type;
}


//! Method to validate visitor name
function validateVisitorName()
{
  var visitor_name = document.getElementById('first_name');
  var error_div    = document.getElementById('error');
		
  if(visitor_name.value.match(/[0-9]/))
    {
      error_div.innerHTML="<font color='red'>Name contain should be alphabets only.<font>";
      visitor_name.focus();
      return false;
    }
  else 
    {
      return true;
    }

}

//! Method to display errors
function displayError(div_error,error)
{
  var error_div=document.getElementById(div_error);
  error_div.style.display="block";
  error_div.innerHTML=error;
}


//! Method to clear errors
function clearError(div_error)
{
  var error_div=document.getElementById(div_error);
  if(error_div.innerHTML)
    {
      error_div.innerHTML="";
    }
}


//! Method to show first name 
function showFirstName(id)
{
  document.getElementById(id).style.display="block";
  document.getElementById('first_name').focus();  
}




//! Method to check name field is empty 	
function isNameEmpty(elenent_id,element_value,error_div)
{
		
  var firstname= document.getElementById(elenent_id).value;
		
  if((firstname==' ')||(firstname==element_value)||(firstname==null)||(firstname.length==0))
    { 			
      //document.getElementById('first_name').value=firstname;	
      if(elenent_id!='first_name')
	{
	  displayError(error_div, "<font color='red'>"+element_value+" required.<font>");
	}
      return false;
    }
  else
    {
      return true;
    } 
}


//! Methods hover on popup 
function showColClass(id){document.getElementById(id).className="hoverdivtitle";}
function hideColClass(id){document.getElementById(id).className="divtitle";}	
function hideselect(){document.getElementById('gender').style.visibility="hidden";}
function showselect(){document.getElementById('gender').style.visibility="visible";}

//! Method to refresh landing page 	
function reFresh(meID)
{
  if(meID!='' || meID!=null )
    {
			
      location.reload(true)
	return true;			
    }
  else
    {	
			
      return true;
    }
}



//! Method to submit popup 
function submitThePage()
{

  var email_text_box   = document.getElementById('email_text_box').value;
  var personal_message = document.getElementById('personal_message').value;
  var first_name       = document.getElementById('first_name').value;
  var link             = document.getElementById('link').value;
  //var vertical_id      = document.getElementById('vertical_id').value
  
  var post_data = '&email_text_box='+email_text_box+'&personal_message='+personal_message+'&first_name='+first_name+'&link='+link;
  YAHOO.util.Connect.asyncRequest('POST',system_base_url+'ajax/share/_sendsharedmail/', callback_sendsharemail, post_data);  

  //alert('submit the page');  
  hideShare();

  //vedio module need to refresh page after success
  var linkValue = link.split('/');
  if(linkValue[1] == 'video')
    {
      document.getElementById('mymedia').style.display='block';
    }
 
   return true;
		
}


//! Method to validate Login, MyAddressBook, MyNetwork
function validagte(action,error_div)
{
  if(isEmpty(action,error_div))
    {
      if(action=='emailid')
	{				
	  if(isNameEmpty('emailid','Username','frm2'))
	    {
	      if(validate_TextBox('emailid','frm2'))
		{
		  if(validate_at_sign('emailid','frm2'))
		    {
		      showMyAddressBook();
		    }

		}
	    }				

	}
      else 
	{
	  if(validate_PersonalMessageBox(action,error_div))
	    {
	      if(action=='username')
		{
		  if(isNameEmpty('username','Profile ID','login_error'))
		    {
		      letmein();
		    }					
		}				
	      if(action=='schools' || action=='workplace')
		{
		  showMyNetwork(action);
		}	
					
	    }
	}
			
    }		
  return false;
}//end


	
//! Method to validate logged-in user
function validateTextBox()
{
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
					
	      if(submitThePage())
		{
		  return true;
		}
					
	    }
	}
    }		
  return false;

}//end


//! Method to validate non logged-in user
function validateTextBox_non()
{
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
	      showFirstName('ufname');
	      if(isNameEmpty('first_name','  First Name',''))
		{						
		  if(validateName('first_name','error'))
		    {	
		      if(validateVisitorName())
			{
			  if(submitThePage())
			    {
			      return true;
			    }							
			}
		    }						
		}
	    }

	}
		
    }
  return false;

}//end 

function sharemsg_onenter(code){
    if(code == 13)
        {
            validateTextBox_non();
            return false;
        }

}


	
//! Method to validate logged-in user using jquery
function validateTextBoxJquery()
{
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
					
	      if(submitThePageJquery())
		{
		  return true;
		}
					
	    }
	}
    }		
  return false;

}//end


//! Method to validate non logged-in user using jquery
function validateTextBox_nonJquery()
{
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
	      showFirstName('ufname');
	      if(isNameEmpty('first_name','  First Name',''))
		{						
		  if(validateName('first_name','error'))
		    {	
		      if(validateVisitorName())
			{
			  if(submitThePageJquery())
			    {
			      return true;
			    }							
			}
		    }						
		}
	    }

	}
		
    }
  return false;

}//end 


	
//! Method to validate logged-in user using jquery
function validateTextBoxJqueryphoto()
{
  
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
					
	      if(submitThePageJquery())
		{
		  return true;
		}
					
	    }
	}
    }		
  return false;

}//end


//! Method to validate non logged-in user using jquery
function validateTextBox_nonJqueryphoto()
{
  if(isEmailTextBoxEmpty())
    {
      if(validate_TextBox('email_text_box','error'))
	{
	  if(validate_PersonalMessageBox('personal_message','error'))
	    {
	      showFirstName('ufname');
	      if(isNameEmpty('first_name','  First Name',''))
		{						
		  if(validateName('first_name','error'))
		    {	
		      if(validateVisitorName())
			{
			   if(submitThePageJqueryphoto())
			    {
			      return true;
			    }							
			}
		    }						
		}
	    }

	}
    }
  return false;

}//end 



//! Method to submit popup using jquery
function submitThePageJquery()
{
  var email_text_box   = document.getElementById('email_text_box').value;
  var personal_message = document.getElementById('personal_message').value;
  var first_name       = document.getElementById('first_name').value;
  var link             = document.getElementById('link').value;
  var post_data = '&email_text_box='+email_text_box+'&personal_message='+personal_message+'&first_name='+first_name+'&link='+link+'&jquery=yes';
  jQuery.post(system_base_url+'ajax/share/_sendsharedmail/', post_data , callback_sendsharemailJquery);  
  $("#share_popup").dialog('destroy');
  var linkValue = link.split('/');
  if(linkValue[1] == 'video')
    {
      document.getElementById('mymedia').style.display='block';
    }
   return true;
}

//! Method to submit popup using jquery
function submitThePageJqueryphoto()
{
  var email_text_box   = document.getElementById('email_text_box').value;
  var personal_message = document.getElementById('personal_message').value;
  var first_name       = document.getElementById('first_name').value;
  var link             = document.getElementById('link').value;

  var post_data = '&email_text_box='+email_text_box+'&personal_message='+personal_message+'&first_name='+first_name+'&link='+link+'&jquery=yes';

  jQuery.post(system_base_url+'ajax/share/_sendsharedmail/', post_data , callback_sendsharemailJqueryphoto);  
  $("#share_popup").dialog('destroy');
  var linkValue = link.split('/');
  return true;
}

function callback_sendsharemailJquery(data)
{
    var link = document.getElementById('link').value;
    var linkValue = link.split('/');
    if(linkValue[1] == 'video' || linkValue[2] == '_view_video')
    {
    document.getElementById('mymedia').style.display='block';
    }
    document.getElementById("share_mail_success").innerHTML =  data;
}


function callback_sendsharemailJqueryphoto(data)
{
    var link = document.getElementById('link').value;
    var linkValue = link.split('/');
    document.getElementById("share_mail_success").innerHTML =  data;
}