function bookmarksite(title, url){
	if (document.all)
	window.external.AddFavorite(url, title);
	else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
}

function confirmSubmit()
 {
 	 var agree=confirm("Are you sure?");
   if (agree)return true ; else return false ;
}

function popup_window(winFile, winWidth, winHeight, winTitle) {
	var LeftPosition = (screen.width) ? (screen.width-winWidth)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-winHeight)/2 : 0;
	var w = window.open('', '','width='+winWidth+',height='+winHeight+',resizable=no,top='+TopPosition+',left='+LeftPosition+'');
	var d = w.document;
	d.open();
	d.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "+"\"http://www.w3.org/TR/html4/strict.dtd\">");
	d.writeln("<html><head><title>" +winTitle+ " Picture<\/title>");
	d.writeln("<meta http-equiv=\"Content-Script-Type\" ","content=\"text/javascript\"><\/head>");
	d.writeln("<body style='margin:0px;padding:0px;'>")
	d.writeln("<div><img src='"+winFile+"'><\/div>");
	d.writeln("<\/body><\/html>");
	d.close();
}

/*
	Removes the spaces from begin of string and from end.
	It means, if string is "  string   " it makes "string"
	Params:
		str string [string witch need to check]
*/
function trimString (str) {

	while (str.charAt(0) == ' ')
		str = str.substring(1);
	while (str.charAt(str.length - 1) == ' ')
		str = str.substring(0, str.length - 1);

	return str;
}
//---------------------------------------------------------------
