
	/*
	 *	Rowdy.nl Website (v6)
	 *  (c) Copyright 1999-2008 by Rowdy.nl
	 *	All Rights Reserved
	 *
	 *  File     : /scripts/common.js
	 *	Created  : 2006/07/06
	 *  Modified : 2006/10/12
	 *
	 */
	 

// initiate an xmlhttp socket
function createXMLHTTPsocket()
{
   var xmlHttp = null;
if (window.XMLHttpRequest) {
  // If IE7, Mozilla, Safari, and so on: Use native object
  xmlHttp = new XMLHttpRequest();
}
else
{
  if (window.ActiveXObject) {
     // ...otherwise, use the ActiveX control for IE5.x and IE6
     xmlHttp = new ActiveXObject('MSXML2.XMLHTTP.3.0');
  }
}

   return xmlHttp;
}

// Create a error container
function error_container(message) {
	return '<div class="error_container"><img src="/gfx/error-trans.png" alt="Error!" />' + message + '</div>';
}

// Create a notice container
function notice_container(message) {
	return '<div class="notice_container"><img src="/gfx/notice-trans.png" alt="Notice" />' + message + '</div>';
}

// Create a warning container
function warning_container(message) {
	return '<div class="warning_container"><img src="/gfx/warning-trans2.png" alt="warning" />' + message + '</div>';
}

function popWindow(mypage, myname, width, height, scrollbars)
{
	var winprops = 'width=' + width + ', height=' + height + ', scrollbars=' + scrollbars + ', resizable=0, toolbar=0';
	var win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
	
function popSmileHelp()
{
	popWindow("/help/smiles","SmileHelp", 275, 475, 0);
}
	
function popBBCodeHelp()
{
	popWindow("/help/bbcode","BBCodeHelp", 550, 500, 1);
}
