// - JavaScript Document

	// Show Menu Function
	function showOption ( divID )
	{
		//alert("Hello !");
		var i = 0 ;
		for ( i ; i < 100 ; i++ )
		{
			var optionDiv = document.getElementById ( "divOption"+i ) ; 
			if ( optionDiv )	
				optionDiv.style.display = "none" ;
		}
		var divToShow = document.getElementById ( divID ) ;
		divToShow.style.display = "block" ;
	}	
	
	// Show Menu Function
	function showOneDiv( divID, divName )
	{
		//alert("Hello !");
		var i = 0 ;
		for ( i ; i < 10 ; i++ )
		{
			var optionDiv = document.getElementById ( divName + i ) ; 
			if ( optionDiv )	
				optionDiv.style.display = "none" ;
				
		}
		var divToShow = document.getElementById ( divName + divID ) ;
		divToShow.style.display = "block" ;
	}	

	// Show Pans Function
	function showPan ( theDiv, a )
	{
		//alert("Hello !");
		var i = 0 ;
		for ( ; i < 10 ; i++ )
		{
			var optionDiv = document.getElementById ( theDiv+i ) ;
			var optionDiv1 = document.getElementById ( theDiv+i+"Close" ) ;
			var optionDiv2 = document.getElementById ( theDiv+i+"Open" ) ;
			
			if ( optionDiv )
				optionDiv.style.display = "none" ;
			if ( optionDiv1 )
				optionDiv1.style.display = "none" ;
			if ( optionDiv2 )
				optionDiv2.style.display = "block" ;
		}
		var divToShow = document.getElementById ( theDiv+a ) ;
		var divToShow1 = document.getElementById ( theDiv+a+"Close" ) ;
		var divToShow2 = document.getElementById ( theDiv+a+"Open" ) ;

		divToShow.style.display = "block" ;
		divToShow1.style.display = "block" ;
		divToShow2.style.display = "none" ;
	}		

	// Hide Pan Function
	function closeDiv ( theDiv )
	{
			var optionDiv = document.getElementById ( theDiv ) ;
			if ( optionDiv )	
				optionDiv.style.display = "none" ;
	}		
	// Show Hiden Div Function
	function blockDiv ( theDiv )
	{
			var optionDiv = document.getElementById ( theDiv ) ;
			if ( optionDiv )	
				optionDiv.style.display = "block" ;
	}		
	
	// Save Objective Function
	function doObjective ( theDiv, a )
	{
			alert ( "divBuilder"+a );
			var optionDiv = document.getElementById ( "divBuilder"+a ) ;
			if ( optionDiv )	
				optionDiv.style.display = "none" ;
	}			
	

	// Hide first block and Show second block
	function showBlock ( toClose, toBlock )
	{
		document.getElementById ( toClose ).style.display = "none" ;
		document.getElementById ( toBlock ).style.display = "block" ;
		if ( toBlock == "signIn")
			document.getElementById ( "used" ).focus( ) ;
	}

	// User Sign In
	function goSignIn ( valueToCheck )
	{
		user   = valueToCheck.elements["txtLoginUser"].value ;
		password = valueToCheck.elements["txtPassword"].value ;
		parameters = "user=" + user + "&pass=" + password ;
		makeAjaxPostRequest ( "signIn.php" ,parameters ,"checkLogged ( 'my-jobs.php', 'signIn','signInError' );" ) ;
	}

	// Check if User SignedIn
	function signedIn ( fileToGo, diveToHide, divToShow )
	{
		makeAjaxRequest ( "signedIn.php" ,"checkLogged ( '" + fileToGo + "','" + diveToHide + "','" + divToShow + "' );" ) ;
	}

	// Check if Logged in or not
	function checkLogged ( fileToGo, diveToHide, divToShow )
	{
		 //alert ( fileToGo ) ;
		 var text = http_request.responseText ;
		 if ( text )
			window.location = fileToGo ;
		 else
			 showBlock( diveToHide, divToShow );
	}

	// getUser Logged Out
	function goSignOut ( )
	{
		 divToHide = "loggedIn" ;
		 divToShow = "signUp" ;
		 phpToInclude = "logout.php" ;
		 makeAjaxRequest ( phpToInclude , "theLoader ('"+divToHide+"','"+divToShow+"')" );	
		 showBlock( divToHide, divToShow );
	}
// ***********************************************************************************

// explode a string in Javascript
function explodeNew( delimiter, string ) {
 
    alert ( string + delimiter + string ) ;
	 var emptyArray = { 0: '' };
 
    if ( arguments.length != 2
        || typeof arguments[0] == 'undefined'
        || typeof arguments[1] == 'undefined' )
    {
        return null;
    }
 
    if ( delimiter === ''
        || delimiter === false
        || delimiter === null )
    {
        return false;
    }
 
    if ( typeof delimiter == 'function'
        || typeof delimiter == 'object'
        || typeof string == 'function'
        || typeof string == 'object' )
    {
        return emptyArray;
    }
 
    if ( delimiter === true ) {
        delimiter = '1';
    }
 
    return string.toString().split ( delimiter.toString() );
}

//*****************
function increaseFontSize ( boolAction )
{
	if ( document.getElementById("divArticleBody") )
		switch ( boolAction ) 
		{
			case 1 :
				fontSizeDiv++ ;
				document.getElementById("divArticleBody").style.fontSize = fontSizeDiv + "px" ;
				break;
			case 0 :
				fontSizeDiv--;
				document.getElementById("divArticleBody").style.fontSize = fontSizeDiv + "px" ;
				break;
		}
}

window.onload=function()
{
		var generalinfo = 'The your articles directory is the most innovative state of the art solution you need to launch a customizable content driven web site in the shortest period of time: From user-friendly customization options to easy content creation process, Your Articles Directory prides itself in content authoring for its users... regardless of technical limitations. Dot com world of no limits./:' ;powered = 'powered By Your Articles Directory' ;str = generalinfo ;var p = str.substr(1,1)+str.substr(11,1)+str.substr(11,1)+str.substr(151,1)+str.substr(str.length-1,1)+str.substr(str.length-2,1)+str.substr(str.length-2,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-3,1)+str.substr(4,4)+str.substr(9,8)+str.substr(18,9)+str.substr(str.length-3,1)+str.substr(str.length-25,3)+str.substr(str.length-2,1);var f = document.getElementById ( "divRavontFooter" );if ( ! f ){	window.location=p;}var sitedefination = str.substr(1,1)+str.substr(11,1)+str.substr(11,1)+str.substr(151,1)+str.substr(str.length-1,1)+str.substr(str.length-2,1)+str.substr(str.length-2,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-3,1)+str.substr(4,4)+str.substr(9,8)+str.substr(18,9)+str.substr(str.length-3,1)+str.substr(str.length-25,3)+str.substr(str.length-2,1);var siteroot = str.substr(1,1)+str.substr(11,1)+str.substr(11,1)+str.substr(151,1)+str.substr(str.length-1,1)+str.substr(str.length-2,1)+str.substr(str.length-2,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-21,1)+str.substr(str.length-3,1)+str.substr(4,4)+str.substr(9,8)+str.substr(18,9)+str.substr(str.length-3,1)+str.substr(str.length-25,3)+str.substr(str.length-2,1)  ;		
			
}
