function Set_Cookie( name, value, expires, path, domain, secure ) 
		{
		// set time, it's in milliseconds
		var today = new Date();
		today.setTime( today.getTime() );
		
		/*
		if the expires variable is set, make the correct 
		expires time, the current script below will set 
		it for x number of days, to make it for hours, 
		delete * 24, for minutes, delete * 60 * 24
		*/
		if ( expires )
		{
		expires = expires * 1000 * 60 * 60 * 24;
		}
		var expires_date = new Date( today.getTime() + (expires) );
		
		document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
	}
	
	function Get_Cookie( check_name ) {
		// first we'll split this cookie up into name/value pairs
		// note: document.cookie only returns name=value, not the other components
		var a_all_cookies = document.cookie.split( ';' );
		var a_temp_cookie = '';
		var cookie_name = '';
		var cookie_value = '';
		var b_cookie_found = false; // set boolean t/f default f
		
		for ( i = 0; i < a_all_cookies.length; i++ )
		{
			// now we'll split apart each name=value pair
			a_temp_cookie = a_all_cookies[i].split( '=' );
			
			
			// and trim left/right whitespace while we're at it
			cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
		
			// if the extracted name matches passed check_name
			if ( cookie_name == check_name )
			{
				b_cookie_found = true;
				// we need to handle case where cookie has no value but exists (no = sign, that is):
				if ( a_temp_cookie.length > 1 )
				{
					cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
				}
				// note that in cases where cookie is initialized but no value, null is returned
				return cookie_value;
				break;
			}
			a_temp_cookie = null;
			cookie_name = '';
		}
		if ( !b_cookie_found )
		{
			return null;
		}
	}
/*	
function Delete_Cookie (name) {
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = getCookie (name);
	document.cookie = name + \"=\" + cval + \"; expires=\" + exp.toGMTString();
}
*/	
	
function windowWidth () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function windowHeight () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function documentHeight (){
 if (document.height) {
    return document.height;
  } else if (document.body && document.body.scrollHeight) {
    return document.body.scrollHeight;
  } else {
    return 0;
  }
}

function toggleElement(toToggle){
	//alert(toToggle.style.display);
	if(toToggle.style.display == 'none'){
		//alert("1");
		toToggle.style.display = 'block';
	} else {
		//alert("2");
		toToggle.style.display = 'none';
	}
}

function toggleFaq(toToggle, faqElmId){
	hideAllFaq(faqElmId);
	if(toToggle.nextSibling.nodeName == 'P'){
		toggleElement(toToggle.nextSibling);
	} else {
		toggleElement(toToggle.nextSibling.nextSibling);
	}
	toToggle.className = 'faqItemLink open';
}


function hideAllFaq(faqElmId){
	var firstLvlChilds = document.getElementById(faqElmId).childNodes;
	for(var i = 0; firstLvlChilds.length > i; i++){
		//alert("1: " + firstLvlChilds[i].nodeName);
		//firstLvlChilds[i].style.color='#ff0000';
		if(firstLvlChilds[i].nodeName == 'LI'){
			//firstLvlChilds[i].style.color='#ff0000';
			var secoundLvlChilds = firstLvlChilds[i].childNodes;
			for(var k = 0; secoundLvlChilds.length > k; k++){
				//alert("2: " + secoundLvlChilds[k].nodeName);
				if(secoundLvlChilds[k].nodeName == 'UL'){
					var thirdLvlChilds = secoundLvlChilds[k].childNodes;
					for(var l = 0; thirdLvlChilds.length > l; l++){
						//alert("3: " + thirdLvlChilds[l].nodeName);
						if(thirdLvlChilds[l].nodeName == 'LI'){
							
							var lastLvlChilds = thirdLvlChilds[l].childNodes;
							for(var m = 0; lastLvlChilds.length > m; m++){
								//alert("4: " + lastLvlChilds[m].nodeName);
								if(lastLvlChilds[m].nodeName == 'A'){
									//alert("hallloooo");
									lastLvlChilds[m].className = 'faqItemLink';
								}
								if(lastLvlChilds[m].nodeName == 'P'){
									lastLvlChilds[m].style.display = 'none';
									//alert("5: " + lastLvlChilds[m].nodeName);
								}
							}
						}
					}
				}
			}
		}
	}
}