function popup(myurl,myname,mywidth,myheight,myoptions) {
    var window_top = (screen.height-myheight)/2;
    var window_left = (screen.width-mywidth)/2;
   	var mywindow = window.open(''+ myurl + '',''+ myname + '','width=' + mywidth + ',height=' + myheight + ',top=' + window_top + ',left=' + window_left + ',' + myoptions + '');
    mywindow.focus();
}

function newsletterpop(mydata,mycol1,mycol2,mysource) {
	var window_top = (screen.height-100)/2;
    var window_left = (screen.width-100)/2;
   	var mywindow = window.open('http://www.mmarketing.eu/newsletter.asp?email='+mydata+'&col1='+mycol1+'&col2='+mycol2+'&src='+mysource+'','popnews','width=400,height=240,top=' + window_top + ',left=' + window_left + '','');
    mywindow.focus();
	}
	
function friendspop(mydata,mycol1,mycol2,mysource) {
	var window_top = (screen.height-100)/2;
    var window_left = (screen.width-100)/2;
   	var mywindow = window.open('http://www.mmarketing.eu/friends.asp?'+mydata+'&col1='+mycol1+'&col2='+mycol2+'&src='+mysource+'','popnews','width=450,height=280,top=' + window_top + ',left=' + window_left + '','');
    mywindow.focus();
	}
	
	
var winh = 0;
var winw = 0;

function getwinsize() {
	if (document.body && document.body.clientHeight) 
		{
			winh = document.body.clientHeight;
			winw = document.body.clientWidth;
		}
	
	if (document.documentElement && document.documentElement.clientHeight) 
		{
			winh = document.documentElement.clientHeight;
			winw = document.documentElement.clientWidth;
       	}
	//alert('larg='+winw+' haut='+winh);
}


function postform(formname)
{
	
	document.forms[""+formname+""].action = 'contact_post_aspam.asp';
	document.forms[""+formname+""].submit();
}

function hidedisc()
	{
	if(document.getElementById)
		{
		document.getElementById("disc_bg").style.display = 'none';
		document.getElementById("disc_content").style.display = 'none';
		document.body.style.overflow = "";
		}
	}


function hidevideos()
	{
	if(document.getElementById)
		{
		document.getElementById("videos_bg").style.display = 'none';
		document.getElementById("videos_content").style.display = 'none';
		document.body.style.overflow = "";
		}
	}
	
function showdisclaimer()
{
	if(document.getElementById)
		{
		getwinsize()
		document.getElementById("disc_bg").style.width = '100%';
		document.getElementById("disc_bg").style.height = winh*2+'px';
		document.getElementById("disc_bg").style.left = '0px';
		document.getElementById("disc_bg").style.top = '0px';
		document.getElementById("disc_content").style.marginTop = (winh-510)/2+'px';
		document.getElementById("disc_content").style.marginLeft = (winw-526)/2+'px';
		document.getElementById("disc_content").style.left = '0px';
		document.getElementById("disc_content").style.top = '0px';
		document.body.style.overflow = "hidden";
		window.scrollTo(0,0)
		}
}

function showvideos()
{
	if(document.getElementById)
		{
		getwinsize()
		document.getElementById("videos_bg").style.width = '100%';
		document.getElementById("videos_bg").style.height = winh*2+'px';
		document.getElementById("videos_bg").style.left = '0px';
		document.getElementById("videos_bg").style.top = '0px';
		document.getElementById("videos_content").style.marginTop = (winh-510)/2+'px';
		document.getElementById("videos_content").style.marginLeft = (winw-526)/2+'px';
		document.getElementById("videos_content").style.left = '0px';
		document.getElementById("videos_content").style.top = '0px';
		document.body.style.overflow = "hidden";
		window.scrollTo(0,0)
		}
}

function opendiv(myfield)
{
	document.getElementById(''+myfield+'').style.display = 'block';
}

function closediv(myfield)
{
	document.getElementById(''+myfield+'').style.display = 'none';
}

function limitText(limitField, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } 
}

var addthis_options = 'facebook, myspace, twitter, digg, favorites, google, live, aolfav, yahoobkm';