$(function (){
	WindowHeight(0);
});


function MakeOutCall(str){
	_webUrl			= $id('webUrl').value;
	_typeStr		= $id('typeStr').value;
	_isNew			= $id('isNew').checked ? 1 : 0;
	_isHomeThumb	= $id('isHomeThumb').checked ? 1 : 0;
	_isThumb		= $id('isThumb').checked ? 1 : 0;
	_isFlash		= $id('isFlash').checked ? 1 : 0;
	_isImg			= $id('isImg').checked ? 1 : 0;
	_isMarquee		= $id('isMarquee').checked ? 1 : 0;
	_isRecom		= $id('isRecom').checked ? 1 : 0;
	_isTop			= $id('isTop').checked ? 1 : 0;
	_rows			= $id('rows').value;
	_cols			= $id('cols').value;
	_maxLen			= $id('maxLen').value;
	_rowHeight		= $id('rowHeight').value;
	_isShowTime		= $id('isShowTime').value;
	_orderSort		= $id('orderSort').value;
	_width			= $id('width').value.replace('%','B');
	_height			= $id('height').value.replace('%','B');
	_bgColor		= $id('bgColor').value.replace('#','');
	_fontSize		= $id('fontSize').value;
	_fontColor		= $id('fontColor').value.replace('#','');
	_font1Size		= $id('font1Size').value;
	_font1Color		= $id('font1Color').value.replace('#','');
	_font1U			= $id('font1U').checked ? 1 : 0;
	_font2Size		= $id('font2Size').value;
	_font2Color		= $id('font2Color').value.replace('#','');
	_font2U			= $id('font2U').checked ? 1 : 0;

	codeUrl = _webUrl +"outCall.asp?typeStr="+ _typeStr +"&isNew="+ _isNew +"&isHomeThumb="+ _isHomeThumb +"&isThumb="+ _isThumb +"&isFlash="+ _isFlash +"&isImg="+ _isImg +"&isMarquee="+ _isMarquee +"&isRecom="+ _isRecom +"&isTop="+ _isTop +"&rows="+ _rows +"&cols="+ _cols +"&maxLen="+ _maxLen +"&rowHeight="+ _rowHeight +"&isShowTime="+ _isShowTime +"&orderSort="+ _orderSort +"&width="+ _width +"&height="+ _height +"&bgColor="+ _bgColor +"&fontSize="+ _fontSize +"&fontColor="+ _fontColor +"&font1Size="+ _font1Size +"&font1Color="+ _font1Color +"&font1U="+ _font1U +"&font2Size="+ _font2Size +"&font2Color="+ _font2Color +"&font2U="+ _font2U +"";

	$id("iframeCode").value = "<iframe src=\""+ codeUrl +"&mode=iframe\" allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\" width=\""+ _width +"\" height=\""+ _height +"\"></iframe>";
	$id("jsCode").value = "<script language='javascript' type='text/javascript' src=\""+ codeUrl +"&mode=js\"></script>";

	if (str=="view"){
		var a=window.open(codeUrl +"&mode=iframe");
	}
//	$id('callForm').target='_blank';
//	$id('callForm').submit();
	AjaxPostDeal("callForm");
}


function ResetCallForm(){
	$id('callForm').reset();
	$id('bgColor').style.color		= $id('bgColor').value;
	$id('fontColor').style.color	= $id('fontColor').value;
	$id('font1Color').style.color	= $id('font1Color').value;
	$id('font2Color').style.color	= $id('font2Color').value;
	CheckImgBox();
}
