// Created  : 18/12/2000
// Updated  : 
// Module   : razglobal.js
// Remarks  : general functions for raz projects on the web
// work with explorer netscape opera
// 	(C) Raz Information Systems.
// *******************************************
////////////////////////////////////////
function GetParameter(location,parameter)
{
	var pre,post,paramLength;
	var answer;
	
	pre = location.indexOf(parameter+'=');
	if(pre < 0) return null; // the paramter wasn't found in the location
	paramLength = parameter.length + 1;
	post = location.indexOf('&', pre);
	pre = pre + paramLength;
	if(post < 0) // it means it is the last parameter in the location
	{
		 post = location.length;
	}
	else // normal parameter
	{	
		post = post - pre;
	}
		 
	answer = location.substr(pre, post);
	return answer;
}
////////////////////////////////////////
function GetElements(Doc)
{
	var i;	
	var buf='?';
	var dt = new Date() -1;	
	
	for (i=0; Doc.elements[i]!=null; i++)
	{
		buf = buf + Doc.elements[i].name + '=' + Doc.elements[i].value + '&';
	}
	
	buf = buf + 'dt='+dt; // to prevent the browser takes the page from cache
	
	return buf;
}
////////////////////////////////////////
function ReplaceBlank(str)
{
	var f_str;
	var reg = / /g;

	f_str = str.replace(reg,"+");

	return f_str;
}




