
            $(document).ready(function(){
                initSearchform()
            });
            
var searchdig;
function initSearchform() {
	$("a[aid='searchform']").click(function () {
		if (searchdig == null) {
			$.ajax({type:"GET", url:"../auction/searchform.do", success:function (htmlstr) {
				searchdig = $("<div></div>").html(htmlstr).addClass("flora");
				searchdig.dialog({title:"\u9ad8\u7ea7\u641c\u7d22", width:500, height:300, minWidth:500, minHeight:300});
			}});
		} else {
			searchdig.dialog({title:"\u9ad8\u7ea7\u641c\u7d22", width:500, height:300, minWidth:500, minHeight:300});
		}
	});
}

function setHomepage()
{
if (document.all) {
       document.body.style.behavior='url(#default#homepage)';
       document.body.setHomePage('http://www.diikee.com');

    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
         { 
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
         } 
         catch (e) 
         { 
            alert("this action was aviod by your browserif you want to enableplease enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true"); 
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://www.diikee.com');
}
}


function addfavorite()
{
 if (document.all)
 {
 window.external.addFavorite('http://www.diikee.com','叮客网---智慧赢实惠,网络新体验');
 }
 else if (window.sidebar)
 {
 window.sidebar.addPanel('叮客网---智慧赢实惠,网络新体验', 'http://www.diikee.com', "");
 }
} 

function copyToClipBoard(text2copy) {
var clipBoardContent='';
clipBoardContent+=(text2copy+"\n");
if (window.clipboardData) {
window.clipboardData.setData("Text",clipBoardContent);
} else {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = "<embed src='/w3c/copy.swf' FlashVars='clipboard="+clipBoardContent+"' width='0' height='0' type='application/x-shockwave-flash'></embed>";
document.getElementById(flashcopier).innerHTML = divinfo;
}
alert('复制成功!');
}
