	function str_replace(haystack, needle, replacement) {
		var temp = haystack.split(needle);
		return temp.join(replacement);
	}
	
	function cleanURLField(str){
		//k we are going to make sure there are no funny characters in the title duh.
		var string = str_replace(str, '!', '' );
		string = str_replace(string, '@', '' );
		string = str_replace(string, '?', '' );
		string = str_replace(string, '/', '' );
		string = str_replace(string, '\\', '' );
		string = str_replace(string, '|', '' );
		string = str_replace(string, ']', '' );
		string = str_replace(string, '[', '' );
		string = str_replace(string, '@', '' );
		string = str_replace(string, '#', '');
		string = str_replace(string, '$', '');
		string = str_replace(string, '%', '');
		string = str_replace(string, '^', '');
		string = str_replace(string, '&', '');
		string = str_replace(string, '*', '');
		string = str_replace(string, '(', '');
		string = str_replace(string, ')', '');
		string = str_replace(string, ' ', '_');
		string = string.toLowerCase();
		return string;
	}


//iframe height auto resize code
//sets the iframe height of the iframes content height
function calcHeight()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('iframeWindow').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('iframeWindow').height=
      the_height;
}
