var affInterfaceOptions = '&pr_code=x9x7aBvBdU2VJibMw6M1UH96ObL655&cols=3&rows=6&shop=z2-deepSky';

function IncludeAffInterface(options,file){
	if(!file) file = 'pr_interface';
	options = affInterfaceOptions + (options ? '&'+options : '');
	document.write('<SCRIPT type="text/javascript" language="JavaScript" src="http://www.mytemplatestorage.com/codes/'+file+'.php?'+options+'"><'+'/SCRIPT>');
}

function Popup(url){
	window.open(
		url,
		'window',
		'width=600, height=600, resizable=yes, scrollbars=yes, location=no,  toolbar=no, menubar=no, status=no'
	);
}


// Hide "www.mytemplatestorage.com" from status bar
function HideStatus(){
	window.status = document.readyState!="complete" ?
		"Loading..." : window.defaultStatus;
}
document.onreadystatechange = HideStatus;


//import variables
function getParams(url) {
	var isSet_params = url.indexOf('?');
	if (isSet_params != -1) {
		var params_line = "&"+url.substring(isSet_params+1, url.length);
		params_line = params_line.replace(/=/g,":\"");
		params_line=params_line.replace(/&/g,"\",").substring(2);
		return "var params={"+params_line.replace(/:,/g,":null,")+"\"};";
	} else {
		return null;
	}
}
eval(getParams(document.URL));
