function generateSeo( fromwhere, towhere, prefix ){
	try{
		var v = (document.getElementById(fromwhere)||0).value;
		if( (/\S/).test(v) ) {
			v = ( prefix||'' ) +
			 v.replace(
				/[^a-zA-Z0-9_]/gm,'-'
			).replace(/-+/gm,'-').replace(/^-|-$/gm,'').toLowerCase();
			if(towhere){
				document.getElementById( towhere ).value = v;
			}
			return v;
		} else { throw new Exception( 'Something went horribly wrong' ) };
	} catch (e){
		return null;
	}
}

function iMessage(message, messageType){
	setTimeout('alert("'+message+'")', 250);
}
