/**
 * autor: joachim.kliemann
 */
if (!YAHOO.hmmh) YAHOO.namespace("hmmh");

YAHOO.hmmh.extendedMyFontShop = function() {
	var orderP = 0;
	
	return {
		init : function() { 
			if(document.getElementById('myFontshop')){
				document.getElementById('myFontshop').value = "true";
			}
		},
		
		getDownloadData : function(e) {
			orderPk = e.id;
			YAHOO.util.Connect.asyncRequest("POST", "myfontshop_load_data.htm", {success: YAHOO.hmmh.extendedMyFontShop.insertDownloadData} , "pk=" + escape(orderPk));
		},
		
		insertDownloadData : function(o){
			var element = $D.getNextSibling(document.getElementById(orderPk));
			var child = $D.getFirstChild(element);
			child.innerHTML = o.responseText;
			//YAHOO.util.Selector.query('.a-m-d-down > .orders', element)[0].innerHTML = o.responseText;
		},
		
		showCollectionImages : function( title, orderPK, entryPK){
			window.open('myFontshopDownloadFromImageCd.htm?orderPK='+orderPK+'&entryPK='+entryPK, title ,'left=700,top=200,width=800,height=500,toolbar=0,resizable=1, titlebar=0, scrollbars=1');
		}
		
				
	};

}();
YAHOO.util.Event.on(window, 'load', YAHOO.hmmh.extendedMyFontShop.init, YAHOO.hmmh.extendedMyFontShop, true);	
