From his office overlooking the Danube River, Janos Nagy, Hungary's deputy foreign minister, glanced out the window at the bridges that tie this Eastern European capital together.

"It is very easy to destroy something," Nagy said. Pointing to the bridges, he added, "During the war they were destroyed in one minute. It has taken us 35 years to rebuild."

In the unsettled political waters of Europe following the apparent collapse of detente between the superpowers, the Eastern European nations appear eager to keep their own bridges to the West intact.

Beneath the official expressions of support for the Soviet invasion of Afghanistan, interviews with East European officials reveal a strong undercurrent of hope that the benefits carefully built up during a decade of increased contacts with the West -- benefits of cooperation, commerce and, in some cases, of greater independence from Moscow -- will not be washed away.

The United States has said it does not intend to include Eastern Europe in the sanctions being directed against the Soviet Union in retaliation for the Afghan invasion. Nevertheless, Soviet Bloc officials worry that their countries are likely to fall victim. Already there are hints that international tensions may be spilling over here. Among them are:

A group of Eastern European scientists were told last month that a scientific conference in California would be closed to them as well as to their Soviet colleagues.

Eastern European business representatives are being asked to supply more extensive information in visa requests for visits to the United States.

Trade ministries have been notified to expect delays in approval of export licenses for U.S. goods destined for Eastern Europe, presumably so that American officials can ensure that the exports will not be passed through to the Soviet Union.

Against this backdrop of political uncertainity, half a dozen American firms recently canceled reservations to attend a Hungarian trade fair in April. A number of tourist groups also reportedly have withdrawn plans to visit Eastern Europe this year.

Such actions, while small and certainly not in all cases a reflection of official U.S. policy, have heightened concern in Eastern Europe about once again being isolated from the West. These anxieties are greater because of a general economic downturn in Eastern Europe, marked by flagging growth rates, disguised inflation, shortages of goods and rising debt burdens.

Under the umbrella of detente, the East Europeans have come to rely heavily on Western technology and credit. Thanks to joint equity ventures and special concession agreements, trade has increased to a point where Eastern Europe's annual dealings with the West exceed $35 billion. The amount of Western trade differs considerably among Moscow's six Soviet Bloc allies, but overall, East Europe today obtains about one-third of its imports from the West.

Western banks and government export credit institutions have lent roughly $50 billion to the six countries -- Hungary, Poland, Romania, East Germany, Czechoslovakia and Bulgaria -- to finance purchase of Western plants and equipment.

Three countries -- Hungary, Poland and Romania -- have been granted most favored nation status by the United States, thus allowing them to avoid discriminatory tariffs on exports. Romania has joined the International Monetary Fund and Hungary has taken a minority share in the first East-West bank that opened recently here.

In view of their new economic difficulties, Eastern European officials believe that another heavy serving of Western technology and know-how is needed to spur productivity and provide the basis for self-sustaining economic growth. They also expect to have to dip deeper into Western credit markets to finance more expensive oil purchases and simply to cover large existing debt obligations.

They worry, however, that the political risks accompanying a new cold war will discourage Western loans and generally raise the costs of contact with the West.

To test the waters, Hungary disclosed last month it will try to raise $250 million in a seven-year loan through a U.S. bank. The interest terms Hungary is seeking are basically unchanged from those it received on a $400 million credit last year.

Depending on the participation the loan draws in the West, officials here hope it will help smooth the financial market for other Eastern European borrowers -- notably Poland, which has indicated that it needs between $5 billion and $6 billion in fresh hard-currency loans this year.

One thought that Eastern European officials take as further ensuring continued access is that Western sources already have invested so heavily in Eastern Europe that they could not afford to abandon the region.

But East-West ties are not only a question of Western willingness. The Soviet Union could well become disturbed by the sight of its Warsaw Pact partners carrying on business as usual with the West while it suffers sanctions. The Soviet leadership is already sensitive to the fact that many East Europeans live better than most Soviet citizens.

Moreover, Eastern European officials privately fret about the likelihood of being asked to shoulder a larger financial burden within their military alliance due to the cost of Soviet operations in Afghanistan and the continuing buildup of forces in Central and Eastern Europe.

So far, the Soviets apparently have not sought to pressure their allies into significantly reducing Western contacts. There have been a spate of postponements, initiated by the East, of planned high-level diplomatic meetings between Eastern and Western officials, thought to have been taken at Soviet suggestion. Among them was the tabling of an East-West German summit.

Nevertheless, East-West working level contacts continue on trade, disarmament and human rights matters, according to officials.

Still, some East European officials clearly are concerned about being drawn more tightly into the Soviet camp. Referring to U.S. intentions of differentiate with sanctions between the Soviets and East Europe, one National Bank of Hungary official cautioned, "You should not advertise that too much."

Perhaps more deeply troubling than the threat posed to their economies by a deterioration of East-West relations is the possible erosion of the independence from Moscow that some Eastern European nations have managed to achieve.

If the Soviet Union is compelled by the current crisis to demand greater cohesion and ideological conformity within the Warsaw Pact, this could result in Hungary abandoning its experiment with liberal economic reform, Poland cracking down on dissidents and Romania being forced to give up its maverick foreign policy.

The cold war veterans in this part of the world remember what it was like to have Soviet tanks roll in during the 1950s and 1960s -- tanks that are still here, despite Soviet statements at the time of intentions to withdraw. Officials here have no wish to relive the experience.

Careful not to draw fresh Soviet censure, Eastern European officials blame the West for spoiling detente by increasing defense budgets and playing up human rights concerns.

"The East Europeans are cautious," a Western diplomat in Budapest said. "They don't want to tweak the nose of the Russian bear."

Still, the chorus of Eastern European reaction to the situation is Afghanistan hardly has been harmonious. The degree of pro-Soviet zealousness in official statements and press reports appears to be inversely proportional to the strength of ties to the West.

Most truculent have been Bulgaria, Czechoslovakia and East Germany. Hungary and Poland have been more reserved, stressing the continuation of detente. Romania has been downright stubborn, giving little press coverage to events in Afghanistan, sending no message of congratulations to the new Afghan leader and not participating in the United Nations vote condemning the Soviet action.

During Poland's eighth party congress last month, party chief Edward Gierek publicly reiterated his proposal for an East-West disarmament conference, suggesting Warsaw as the site. The purpose of the offer, a senior Polish official said in an interview, was to encourage a lessening of international tensions.

Even so, the Eastern European nations appear to have no intention of playing middlemen between the superpowers.

"We don't want to play any mediator role," the Polish official said.

"There are still many open channels between the superpowers. But we think it is our duty to warn the world about the dangers of a return to the cold war."

"Cooperation for us is a synonym for security," the official added.