/*
'=================================================================================
'
'    Designer's site Program 全站静态系统
'    xizon@c945.com
'    www.c945.com
'    技术支持：没位道
'    未经允许不得私自用于任何商业用途
'    产品官方网站：http://www.badpark.net   http://www.c945.com/d-s
'
'=================================================================================
*/
function include(path) 
{ 
      var scripts = document.getElementsByTagName("script"); 
      if(!scripts) return;
      var jsPath = scripts[0].src;      
      jsPath=jsPath.substring(0,jsPath.lastIndexOf('/')+1);
      var sobj = document.createElement('script'); 
      sobj.type = "text/javascript"; 
      sobj.src = jsPath+path; 
      var headobj = document.getElementsByTagName('head')[0]; 
      headobj.appendChild(sobj); 
}

include('commConfig.js');
var MyrootPath;
//================================================
//★模板的客户端自动更新调用
//用法
//var upID = ''; upTemp("???");
//================================================
function upTempRe(name){

var tempIdent=new Array();
upID = upID.replace("classListWorks","");
upID = upID.replace("classList","");
upID = upID.replace("Works","");


tempIdent[0]=MyrootPath + "admin/root_temp-edit/content_article_action.asp?articleid="+upID;
tempIdent[1]=MyrootPath + "admin/root_temp-edit/content_works_action.asp?thisid="+upID;
tempIdent[2]=MyrootPath + "admin/root_temp-edit/newCustomPage_SingleAction.asp?thisid="+upID;
tempIdent[3]=MyrootPath + "admin/root_temp-edit/newCustomPage_classListArt_SingleAction.asp?thisid="+upID;
tempIdent[4]=MyrootPath + "admin/root_temp-edit/newCustomPage_classListWorks_SingleAction.asp?thisid="+upID;




appName=name;

switch (appName)
   {
	   case "myartID":  var id = 0; break;
	   case "myWorksID":  var id = 1; break;
       case "myNewPage":  var id = 2; break;
	   case "myNewPage_classList_art":  var id = 3; break;
	   case "myNewPage_classList_works":  var id = 4; break;
	   
	   
      
   default: document.write("Error!");
}

    if (appName == "myartID" || appName == "myWorksID"){
		$("body").prepend('<span id="upIframe"></span>'); $("#upIframe").html('<iframe src="'+tempIdent[id]+'" style="display:none"></iframe>');
	}else{		
		$(function () {
			$(window).scroll(function(){
				var a1 = $(document).height() - $(window).height() - 50;
				var a2 = $(window).scrollTop();
				//alert(a1 + "=" + a2);
				if (a2 >= a1) {$("body").prepend('<span id="upIframe"></span>'); $("#upIframe").html('<iframe src="'+tempIdent[id]+'" style="display:none"></iframe>');}
				
			});
		});
	}
	
}
