addEvent(window,'load',dialogue,'false')


function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType,function(){fn.apply(obj)});
    return r;
    }
}

function dialogue() {
 dA = document.getElementById('da');
 dQ = document.getElementById('dq');
 var s=-1;

var sentences=[
				
					["I feel like shit","Hmm, Why?"],
					["I'm misunderstood, ignored","I see"],
					["I can't live up to <br /> the expectations...",""],
					[".. All my clients want different things"," Go on"],
          [".. but just for the sake of their own"," "],
          ["I grow mad","Shit hits the fan"],
          ["","Now and then"],
					["I try to develop myself","Good. I told you"],
					["I've changed a lot lately","Even better"],
					["I've grew older, became more mature","That's life"],
					["Got children <br/>","Great"],
					["Canvas, xhtml, SVG, XHTMLREQUEST","Fancy names"],
					["They don't like<br/>my children","No?<br/>Why not"],
					["Dunno, guess it's because <br/> of my wife","Oh"],
						["","Why"],
					["I married Open Standards","Smart Girl"],
					["","Open minded"],
					["","Accessible"],
          ["Yes, she's nice, most people can get along with her",""],
          ["But some wanted me to marry their own daughter","Hmm, hot chick?"],
          ["No!","Rich?"],
          ["Yes, an unpleasant air of superiority",""],
          ["They married off their daughter before I was born","Hm Orthodox people?"],
          ["","Muslims, Jews" ],
          ["","Reli madmen" ],
          ["No, ehh",""],
          ["Microsoft","Ah, I see"],
					["They don't like other people's children","Impolite!"],
					["They think their children are best","Pride goes"],
					["","before a fall"],
					["They hate me, they ignore me, they kill me","Just<br/>stupid!"],
					["They say, my nephew Linux has infectious cancer","Redmond"],
					["","is well known"],
					["","for their"],
					["","doctors"],
					["","We help"],
					["Thanks I wanna be proud to serve all systems","doctors"]
					]
					
  setInterval(function(){
		s++;
		if (s==sentences.length) s=0;
		for (var i=1;i<=10;i++)
			{setTimeout('this.setOpacity('+((10-i)*.1)+')' ,30*i);}

		setTimeout(function(){
			dQ.style.opacity=1;
			dQ.style.filter ='alpha(opacity=100)';
			dQ.innerHTML="<span>"+sentences[s][0]+"</span>";
			},2500)

		setTimeout(function(){
			dA.style.opacity=1;
			dA.style.filter ='alpha(opacity=100)';
			dA.innerHTML="<span>"+sentences[s][1]+"</span>";
			},4000)

		},7000);
}

function setOpacity(op){
		dQ.style.opacity=op;
		dA.style.opacity=op;
		dQ.style.filter ='alpha(opacity='+op*100+')';
		dA.style.filter ='alpha(opacity='+op*100+')';
	  }
	  
function getStyle(obj,style){
return document.defaultView.getComputedStyle(obj,"").getPropertyValue(style)
}
/*
	parseUri 1.2.1
	(c) 2007 Steven Levithan <stevenlevithan.com>
	MIT License
*/

function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};

