jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
	    var formToShow = getUrlVars()["formtoshow"];
		if (formToShow == "geneva_de") {
			GB_showCenter('GRC Day Genf - 4. Mai 2010', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-event-send-info-via-mail.php', 700, 900);
		}
		if (formToShow == "geneva_en") {
			GB_showCenter('GRC Day Geneva - May 4, 2010', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-event-send-info-via-mail-EN.php', 700, 900);
		}
		if (formToShow == "bgcheck_samplerep_de") {
			GB_showCenter('Anonymisierter Background Check Muster-Report', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-background-checks.php', 700, 900);
		}
		if (formToShow == "bgcheck_samplerep_en") {
			GB_showCenter('Anonymized Background Check Sample Report', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-background-checks-en.php', 700, 900);
		}		
		if (formToShow == "bgcheck_contact_de") {
			GB_showCenter('Termin vereinbaren ...', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-background-checks.php', 700, 900);
		}
		if (formToShow == "bgcheck_contact_en") {
			GB_showCenter('Contact and meet our ECI experts ...', 'http://eci.solutions.scalaris.com/_eci-web/contact-form-background-checks-en.php', 700, 900);
		}
		
	}
);


function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

Liferay.Portlet.ready(

	/*
	This function gets loaded after each and every portlet on the page.

	portletId: the current portlet's id
	jQueryObj: the jQuery wrapped object of the current portlet
	*/

	function(portletId, jQueryObj) {
	}
);

jQuery(document).last(

	/*
	This function gets loaded when everything, including the portlets, is on
	the page.
	*/

	function() {
	}
);

