var nn = false; 

	var n6 = false; 

	var ie = false;

	if (document.getElementById && !document.all) {

		n6 = true;

	} else if (document.layers) { 

		nn = true;

	} else if (document.all) { 

		ie = true;

	}

	function doResize(){

		/*var adjW = 0;

		var adjH = 0;

		var iHeight = (nn || n6) ? parseInt(window.innerHeight)-adjH : parseInt(document.body.clientHeight)-adjH;

		var iWidth = (nn || n6) ? parseInt(window.innerWidth)-adjW : parseInt(document.body.clientWidth)-adjW;

		alert(iHeight)

		alert(iWidth)

		var oWidth = #url.tmpl_w#;

		var oHeight = #url.tmpl_h#;

		

		if(oWidth>iWidth){

			oWidth = iWidth;

			oHeight = 

		}

		flashMC.width = oWidth;

		flashMC.height = oHeight;

		*/

		doMaximize();

	}

	function doLoad(){

		doMaximize();

	}

	function doMaximize(){

		//alert(document.body.clientHeight)

		//alert(document.body.clientWidth)

		

		

		

		var oWidth = defWidth;

		var oHeight = defHeight;

		var oWidth = 1000;

		var oHeight = 687;

		var adjW = 0;

		var adjH = 0;

		var w,h

		w = document.body.clientWidth;

		//h = (w*550)/800;

		h = document.body.clientHeight;

		

		

		

		h = (nn || n6) ? parseInt(window.innerHeight)-adjH : parseInt(document.body.clientHeight)-adjH;

		w = (nn || n6) ? parseInt(window.innerWidth)-adjW : parseInt(document.body.clientWidth)-adjW;

		

		

		if(w>oWidth && h>oHeight){

			w=oWidth

			h=oHeight

		}else if(w>oWidth && h<oHeight){

			w = (h*oWidth)/oHeight;

		}else if(w<oWidth && h<oHeight){

			if((oWidth/w)>(oHeight/h)){

				h = (w*oHeight)/oWidth;

			}else{

				w = (h*oWidth)/oHeight;

			}

		}else if(w<oWidth && h>oHeight){

			h = (w*oHeight)/oWidth;

		}

		

		if(w<oWidth || h<oHeight){

			w=defWidth;

			h=defHeight;

		}

		

		

		

		flashMC.width = w-12;

		flashMC.height = h-9;

	}

	

	function launchCenter(url, name, height, width) {

  	var str = "height=" + height + ",innerHeight=" + height;

  	str += ",width=" + width + ",innerWidth=" + width+", resizable,scrollbars=yes";

  	if (window.screen) {

  	  var ah = screen.availHeight - 30;

  	  var aw = screen.availWidth - 10;



  	  var xc = (aw - width) / 2;

  	  var yc = (ah - height) / 2;



    	str += ",left=" + xc + ",screenX=" + xc;

  		str += ",top=" + yc + ",screenY=" + yc;

  	}

  	return window.open(url, name, str);

}



	

	function wc_openCalendar(_url){

		//alert(_url);

		launchCenter(_url, 'center', 480, 480);

	}

	function wc_openCoupon(_url){

		launchCenter(_url, 'center', 440, 600);

	}

	

	//document.write('<ifr'+'ame id="urlGetter" name="urlGetter" width="0" height="0"></if'+'rame>');
