function add_bb(id, open, close)
{
        comp = navigator.userAgent.toLowerCase();
        vers = parseInt(navigator.appVersion);
        msie = ((comp.indexOf("msie") != -1) && (comp.indexOf("opera") == -1));
        opera = ((comp.indexOf("opera") != -1));
        nets = ((comp.indexOf('mozilla')!=-1) && (comp.indexOf('spoofer')==-1) && (comp.indexOf('compatible') == -1) && (comp.indexOf('opera')==-1) && (comp.indexOf('webtv')==-1) && (comp.indexOf('hotjava')==-1));
        win  = ((comp.indexOf("win")!=-1) || (comp.indexOf("16bit") != -1));

        if (((vers >= 4) && msie && win) || opera) {
                selection = document.selection.createRange().text;

                if (!selection) {
                        document.getElementById(id).value += open + " " + close;
                        document.getElementById(id).focus();

                        return;
                }
                else {
                        document.selection.createRange().text = open + selection + close;
                        document.getElementById(id).focus();

                        return;
                }

                if (document.getElementById(id).createTextRange)
                        document.getElementById(id).caretPos = document.selection.createRange().duplicate();
        }
        else {
                document.getElementById(id).value += open + " " + close;
                document.getElementById(id).focus();
        }
}

function add_smile(id, ubb)
{
         var ubb = " " + ubb + " ";

         if (document.getElementById( id ).createTextRange)
         {
                           document.getElementById( id ).focus();
                           document.selection.createRange().duplicate().text = ubb;
         }
         else
         {
                           document.getElementById( id ).value += ubb;
         }
}

function submitForm( )
{
	document.getElementById( 'loading' ).style.display  = 'block';

	return true;
}

function navigatie(waar)
{
        eval("parent" + ".location = '" + waar.options[waar.selectedIndex].value + "'");
}

function download( url )
{
		document.location = url;
}

function changeCategory( id )
{
	if( id == 15 )
	{
		document.getElementById( 'frmTitle' ).innerHTML = 'Motherboard:';
		document.getElementById( 'frmVersion' ).innerHTML = 'BIOS Version:';
	}
	else
	{
		document.getElementById( 'frmTitle' ).innerHTML = 'Title:';
		document.getElementById( 'frmVersion' ).innerHTML = 'Version</b> (optional):';	
	}	

}

$(function() {
	$('.wrap').hover(function() {
	  $(this).children('.front').css("display", "none");   
	}, function() {
	  $(this).children('.front').css("display", "block");       
	});
});
$(document).ready(function()
{
	$( '#zoeken' ).focus( function ( ) {
		$( this ).val('');
	} );

	$( '#nieuwsbrief' ).focus( function ( ) {
		$( this ).val('');
	} );
	
	$( '#username' ).focus( function ( ) {
		$( this ).val('');
	} );

	$( '#password' ).focus( function ( ) {
		$( this ).val('');
	} );
    
    $( '#commentsHide' ).click (function( ) {
        $( '#comments' ).hide();    
        $( '#commentsHide' ).hide();
        $( '#commentsShow' ).show();
    } );
    
    $( '#commentsShow' ).click (function( ) {
        $( '#comments' ).show();    
        $( '#commentsShow' ).hide();
        $( '#commentsHide' ).show();
    } );

});

