<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
$logo_message = simplexml_load_file('SitestarMaker/SitestarMaker.xml');
$banner_width = $logo_message->tpl_banner->banner_width;
$banner_height = $logo_message->tpl_banner->banner_height;
$logo_width = $logo_message->tpl_logo->logo_width;
$logo_height = $logo_message->tpl_logo->logo_height;
?>
<style type="text/css">
.fr{
	background:#f6f6f4;
	height:1000px;
}
.tabber{
font-size:15px;
}
</style>

<script type="text/javascript">
<!--
var width1 = $('.fr').width();
if(width1 == '')
{
	var fl = $('.fl').width();
	var fw = $(window).width();
	width1 = fw-fl;
}

$(document).ready(function(){
	$('#canvas1').css('width',width1);
});
//document.write('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=googlestyle" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
function clickEvent(src)
{
	$('#'+src).css('cursor','pointer');
	$('#show_pic1').css('display','none');
	if(src == 'ChooseBanner')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=ChooseBanner" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
	else if(src == 'RotateBanner')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=RotateBanner" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
	else if(src == 'SnowSwf')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=SnowSwf" frameBorder=no width='+width1+' height="900" scrolling=no></IFRAME>');
	}
	else if(src == 'GoogleStyle')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=GoogleStyle" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
	else if(src == 'TechSir')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=TechSir" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
	else if(src == 'ChooseLogo')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=ChooseLogo" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
	else if(src == 'PureText')
	{
		$('#show_workbench').empty();
		$('#show_workbench').append('<IFRAME name="cwin2" border=0 marginWidth=0 marginHeight=0 src="SitestarMaker/index1.php?_m=PureText" frameBorder=no width='+width1+' height="700" scrolling=no></IFRAME>');
	}
}
function selectFunction(src)
{
	var html;
	$('#show_pic1').css('display','block');
	if(src == 'selectLogo')
	{
		$('#show_tabs').empty();
		$('#show_workbench').empty();
		html = '<div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'ChooseLogo\');" id="ChooseLogo" style="display:inline;"><img src="images/select_banner.gif"/><span class="tabber">可挑选图形</span></div><div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'GoogleStyle\');" id="GoogleStyle" style="display:inline;margin-left:12px;"><img src="images/google.png"/><span class="tabber">Google风格</span></div><div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'PureText\');" id="PureText" style="display:inline;margin-left:12px;"><img src="images/puretext.gif"/><span class="tabber">简单字体风格</span></div><div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'TechSir\');" id="techsir" style="display:inline;margin-left:12px;"><img src="images/techsir.gif"/><span class="tabber">科技光线风格</span><span style="margin-left:12px;">推荐尺寸: 宽小于<?php echo $logo_width;?> 高<?php echo $logo_height;?></span></div>';
		$('#show_tabs').append(html);
	}
	else if(src == 'selectBanner')
	{
		$('#show_tabs').empty();
		$('#show_workbench').empty();
		html = '<div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'ChooseBanner\');" id="choosebanner" style="display:inline;"><img src="images/select_banner.gif"/><span class="tabber">可挑选图形</span></div><div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'RotateBanner\');" id="RotateBanner" style="display:inline;margin-left:12px;"><img src="images/rotatebanner.gif"/><span class="tabber">图片轮播</span></div><div onmouseover="$(this).css(\'cursor\',\'pointer\');" onclick="clickEvent(\'SnowSwf\');" id="SnowSwf" style="display:inline;margin-left:12px;"><span style="margin-left:12px;">推荐尺寸: 宽:<?php echo $banner_width;?>&nbsp;高:<?php echo $banner_height;?></span></div>';
		$('#show_tabs').append(html);
	}
}
-->
</script>
<div id="canvas1">
<div style="margin-top:12px;margin-left:10px;background:#f6f6f4;">
<span><img id='select_logo' onmouseover="$(this).css('cursor','pointer');" onclick="selectFunction('selectLogo');" onmouseout="$(this).css('cursor','default');" src="images/select_logo.jpg"/></span>
<span><img id='select_banner' onmouseover="$(this).css('cursor','pointer');" onclick="selectFunction('selectBanner');" onmouseout="$(this).css('cursor','default');" src="images/select_banner.jpg"/></span>
<span><a target="_blank" href="../index.php?_v=preview"><img style="border:none;" src="template/images/view.png"/>预览</a></span>
</div>
<div style="margin-top:12px;margin-left:10px;background:#f6f6f4;" id="show_tabs"></div>
<div style="margin-top:12px;" id="show_workbench"></div>
<div id="show_pic1"><img src="images/ban1.png"></div>
</div>
