// JavaScript Document

function submitUserForm() 
{
	$("#mess_response").append('');
	var dataString = $('#form1').serialize();	
	//alert(dataString) ;
	$.ajax({
		  type: "POST",
		   url: "sendmail.php",
		   data: dataString,
		  success: function(html){
			$("#mess_response").append(html);
		  }
		});
}

function submitContactForm() 
{
	$("#m_response").append('');
	var dataString = $('#contactform').serialize();	
	//alert(dataString) ;
	$.ajax({
		  type: "POST",
		   url: "contactmail.php",
		   data: dataString,
		  success: function(data){
			alert(data) ;
			//$("#m_response").append(data);
		  }
		});
}



/**************************************************************************
var language ;
				
		if (navigator.browserLanguage)
		{
			language = navigator.browserLanguage
		} else
		{
			language = navigator.language;
			
		}
		var lang ;
		
		if (language.indexOf('fr') > -1)
		{
			lang = 'fr' ;
		} else {
				lang = 'en' ;
		}

function setVisibleToggle()
{
	myHeight = new fx.Height('hFooter', {duration: 400});
	myHeight.hide();

}

function linkLogo() {
	
	
	if ($('logo') ) 
	{
		
		var element = $('logo') ;
		element.writeAttribute('href', '#')
		$('logo').onclick = function() {
										window.location = "http://dev.ephrem-studio.com/ephrem-studio/_www/" ; 

										};
	}
	
}

	function setLyteBox(url,width,height) 
		{
			
			var objLink = document.createElement('a');
			   objLink.setAttribute('href',url);
			   objLink.setAttribute('rel','lyteframe');
			   objLink.setAttribute ('rev', 'width: '+width+'px; height: '+height+'px; scrolling: yes;');
			  
			   //LyteBox.prototype.start(objLink,false,true) ;
				myLytebox.start(objLink, false, true); 
				return false;
		}
		
	function setFlash()
	{
			
			if (arguments.callee.done) return;

		  // flag this function so we don't do the same thing twice
		  arguments.callee.done = true;

			
			var flashvars = {};
			flashvars.pathInfo = "http://dev.ephrem-studio.com/ephrem-studio/_www/" ;
			flashvars.hostname = "http://dev.ephrem-studio.com" ;
			flashvars.lang = lang ;
			
			var params = {};
			params.menu = "false";
			params.wmode = "transparent";
			
			var attributes = {};
			attributes.id = "FlashContent" ;
			attributes.name = "FlashContent" ;
				swfobject.embedSWF("flash/gradient.swf", "myContent", "100%", "100%", "10.0.0","flash/expressInstall.swf", flashvars, params, attributes);
			//  swfobject.embedSWF("flash/preloader.swf", "myContent", "100%", "100%", "10.0.0","flash/expressInstall.swf", flashvars, params, attributes);
			 swfmacmousewheel.registerObject(attributes.id);
	}	
		
	function setVisibleFooter() 
	{
			myHeight.toggle() ;
			//alert(pageTracker);
			//var pageTracker = _gat._getTracker("UA-4965535-2");
			pageTracker._trackEvent('follow','openfooter');
	}
	
function addToSocialBookMark(deepLink, title, e) 
		{
			alert('addToSocialBookMark(' + deepLink + ',' + title + ', ' + e + ')') ;
			switch(e)
			{
				case "twitter":
				  urLink = "http://twitter.com/home?status="+title+" "+blogURL+"/" + deepLink;
				  
				break;
				case "delicious":
				   urLink = "http://del.icio.us/post?url="+blogURL+"/" + deepLink+"&description="+title ;
				   
				break;
				case "facebook":
				   urLink = "http://www.facebook.com/sharer.php?u="+blogURL+"/" + deepLink+"&t="+title ;
				   
				break;
			
			}
			
			jQuery.facebox('<iframe src=popup.html width=500 height=500 scrolling=no frameborder=0></iframe>') ;
			
		} ;
*/


