/*
 * e_frame.js
 * http://www.e-vision.nl/
 * 
 * Author: Deepak Bhikharie
 * Date: 2009-06-03 17:00:00 +0100 (Wed, 03 Jun 2009)
 * 
 * Appends google-analytics-cookie information to frameURL 
 * for correct calling iframes
 */

(function(){
	/* 
	expects hidden inputs which contains the URL's to call
	idd of hidden input MUST be the id of the corresponding iframe appended with URL
	i.e.: if the iframe id is 'gaframe1' the hidden input id must be 'gaframe1URL'
	*/
	var fraURLS = $C("gaframe");
	for(var i=0;i<fraURLS.length;i++){
		var fra = $(fraURLS[i].id.split("URL")[0]);
		if(fra){
			try {
				fra.src = pageTracker._getLinkerUrl(fraURLS[i].value);
			} catch(err){
				fra.src = fraURLS[i].value;
			}
		}
	}
})();
