function setInputClear( field )
{
	if ( field.defaultValue == field.value )
	    field.value = "";
}

function popup( url, name, height, width, menubar )
{
	var config = "height=" + height + ", width=" + width + ", toolbar=no, menubar=" + menubar + ", location=no, directories=no, status=yes, resizable=yes, scrollbars=yes";
	var win = window.open( url, name, config );
}

// Font switchers functions.

function setCookie( name, value, days, path, domain, secure )
{
	var expires, date;
	if ( typeof days == "number")
	{
		date = new Date();
		date.setTime( date.getTime() + ( days * 24 * 60 * 60 * 1000 ) );
		expires = date.toGMTString();
	}
	document.cookie = name + "=" + escape( value ) + ( ( expires ) ? "; expires=" + expires : "" ) +
		( ( path ) ? "; path=" + path : "" ) + ( ( domain ) ? "; domain=" + domain : "" ) + ( ( secure ) ? "; secure" : "" );
}

function getCookie( name )
{
	var nameq = name + "=";
	var c_ar = document.cookie.split( ';' );
	for ( var i = 0; i < c_ar.length; i++ )
	{
		var c = c_ar[i];
		while ( c.charAt( 0 ) == ' ' )
			c = c.substring( 1, c.length );
		if ( c.indexOf( nameq ) == 0 )
			return unescape( c.substring( nameq.length, c.length ) );
	}
	return '';
}

function deleteCookie( name, path, domain )
{
	if ( getCookie( name ) )
		document.cookie = name + "=" + ( ( path ) ? "; path=" + path : "") +
			( ( domain ) ? "; domain=" + domain : "" ) + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

var bodySize = 1;

function fixSize( fontSize )
{
 	setCookie( "myFontSize", fontSize, 100, "/" );
	document.body.style.fontSize = fontSize + "em";
}

function increaseSize()
{
	var fontSize = getCookie( "myFontSize" );
	if ( fontSize == "" )
		fontSize = bodySize + 0.2;
	else if ( fontSize < 1.4 )
		fontSize = eval( fontSize ) + 0.2;
	fixSize( fontSize );
}

function decreaseSize()
{
	var fontSize = getCookie( "myFontSize" );
 	if ( fontSize == "" )
		fontSize = bodySize - 0.2;
	else if ( fontSize > 0.8 )
		fontSize = eval( fontSize ) - 0.2;
	fixSize( fontSize );
}

function restartSize()
{
	var fontSize = bodySize;
	fixSize( fontSize );
}

function startSize()
{
	var fontSize = getCookie( "myFontSize" );
	if ( fontSize == "" )
		fontSize = bodySize;
	fixSize( fontSize );
}

function init(){
	for(var i=2; i<=2; i++){
		document.getElementById('fullblock'+i).style.display = 'none';
	}
}

function viewSection(id,total){
	for (var i=1; i<=2; i++){
		if(i!=id){
			document.getElementById('fullblock'+i).style.display = 'none';
		}else{
			document.getElementById('fullblock'+i).style.display = 'block';
		}
	}
}

// Open ADS

var OA_p=location.protocol=='https:'?'https:':'http:';
var OA_r=Math.floor(Math.random()*99999999);
if (!document.OA_used) document.OA_used = ',';
function OA_adjs(z,n)
{
  if (z>-1) {
    var az="<"+"script language='JavaScript' type='text/javascript' ";
    az+="src='"+OA_p+"//ads.iguanait.com/www/delivery/ajs.php?n="+n+"&zoneid="+z;
    az+="&source="+OA_channel+"&exclude="+document.OA_used+"&r="+OA_r;
    az+="&mmm_fo="+(document.mmm_fo)?'1':'0';
    if (document.context) az+= "&context=" + escape(document.context);
    if (window.location) az+="&loc="+escape(window.location);
    if (document.referrer) az+="&referer="+escape(document.referrer);
    az+="'><"+"/script>";
    document.write(az);
  }
}
function OA_adpop(z,n)
{
  if (z>-1) {
    var az="<"+"script language='JavaScript' type='text/javascript' ";
    az+="src='"+OA_p+"//ads.iguanait.com/www/delivery/apu.php?n="+n+"&zoneid="+z;
    az+="&source="+OA_channel+"&exclude="+document.OA_used+"&r="+OA_r;
    if (window.location) az+="&loc="+escape(window.location);
    if (document.referrer) az+="&referer="+escape(document.referrer);
    az+="'><"+"/script>";
    document.write(az);
  }
}